User Tools

Site Tools


linux:linux-own-service

Create own simple service

Create file: /etc/systemd/system/myservice.service

[Unit]
Description=Simple bash based service
Requires=network.service

[Service]
ExecStart=/bin/bash mybashscript.sh
Type=simple

[Install]
WantedBy=default.target

Enabling

sudo systemctl daemon-reload
sudo systemctl enable myservice.service
linux/linux-own-service.txt · Last modified: 2023/02/12 17:01 by els

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki