Skip to content

Instantly share code, notes, and snippets.

@gustavorv86
Created October 7, 2021 08:04
Show Gist options
  • Save gustavorv86/f5b427bfffaca9cd6e5ac721afd08b2f to your computer and use it in GitHub Desktop.
Save gustavorv86/f5b427bfffaca9cd6e5ac721afd08b2f to your computer and use it in GitHub Desktop.
Systemd simple service unit file
[Unit]
Description=My service Daemon
After=network.target
[Service]
Type=simple
Restart=always
RestartSec=5
User=root
WorkingDirectory=/opt/myservice
ExecStart=/opt/myservice/bin/start.sh
ExecStop=/opt/myservice/bin/stop.sh
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment