Skip to content

Instantly share code, notes, and snippets.

@Nervengift
Last active October 16, 2015 13:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Nervengift/4b037ee4ad33563a9f3b to your computer and use it in GitHub Desktop.
Save Nervengift/4b037ee4ad33563a9f3b to your computer and use it in GitHub Desktop.
Simple template unit file for running daemons via systemd
[Unit]
Description=<description>
# Start after network (network may still not be online on start, see http://www.freedesktop.org/wiki/Software/systemd/NetworkTarget/)
#After=network.target
[Service]
# If the program forks to background
#Type=forking
ExecStart=<full path to program [with parameters and option]>
# Run as specific user
#User=<user>
[Install]
WantedBy=multi-user.target
@Nervengift
Copy link
Author

goes to /etc/systemd/system/
enable with systemctl enable foo.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment