Created
May 26, 2018 03:55
-
-
Save suryadana/847718dece1634aeafe9f887cb1664ff to your computer and use it in GitHub Desktop.
Run your script with systemd on linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copy to /etc/systemd/system/ this script and change ExecStart value. | |
After=syslog.target network.target | |
[Service] | |
ExecStart=/usr/bin/python /path/of/script/main.py | |
Restart=on-abort | |
[Install] | |
WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment