Skip to content

Instantly share code, notes, and snippets.

@stantonk
Last active January 2, 2016 18:09
Show Gist options
  • Save stantonk/8341359 to your computer and use it in GitHub Desktop.
Save stantonk/8341359 to your computer and use it in GitHub Desktop.
Upstart conf example
#
# 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