Skip to content

Instantly share code, notes, and snippets.

@patrickdappollonio
Created January 22, 2016 23:02
Show Gist options
  • Save patrickdappollonio/4ac83077f93f4abdf76c to your computer and use it in GitHub Desktop.
Save patrickdappollonio/4ac83077f93f4abdf76c to your computer and use it in GitHub Desktop.
Upstart code to daemonize quickly a set of instructions (place them on /etc/init/filename.conf where filename will be the name of the service to be executed, like "service filename start")
#!upstart
description "Place a description here"
author "John Doe"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [06]
respawn
script
# place here all instructions below this line, like "python -m file.py" (without the quotes)
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment