Last active
January 2, 2016 18:09
-
-
Save stantonk/8341359 to your computer and use it in GitHub Desktop.
Upstart conf example
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
# | |
# Put your-service.conf in /etc/init/your-service.conf | |
# | |
# Then tell upstart about your new service: | |
# $ sudo initctl reload-configuration | |
# | |
# Then these commands all work as expected: | |
# $ sudo start your-service | |
# $ sudo stop your-service | |
# $ sudo status your-service | |
# $ sudo restart your-service | |
description "your-service" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
# this tells upstart to restart the service if it dies | |
respawn | |
# executable for your service | |
exec /home/user/your-service/main.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment