Skip to content

Instantly share code, notes, and snippets.

@anandpathak
Created February 22, 2019 10:15
Show Gist options
  • Save anandpathak/50fa6c472e5454a097d4cd836d035567 to your computer and use it in GitHub Desktop.
Save anandpathak/50fa6c472e5454a097d4cd836d035567 to your computer and use it in GitHub Desktop.
systemctl example
#AN example service file
[Unit]
Description=Service example
After=network.target
[Service]
WorkingDirectory=/usr/local/
ExecStart=/bin/sh -c "command >> /var/log/example.log 2>&1"
Restart=on-failure
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment