Skip to content

Instantly share code, notes, and snippets.

@enmanuelr
Last active December 29, 2015 20:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enmanuelr/7721603 to your computer and use it in GitHub Desktop.
Save enmanuelr/7721603 to your computer and use it in GitHub Desktop.
Attempt at creating an upstart service
# Panacea - panacea job file
description "Panacea Server"
console log
# When to start the service
#start on runlevel [2345]
start on (local-filesystems and net-device-up IFACE!=lo)
# When to stop the service
stop on runlevel [016]
# Automatically restart process if crashed
respawn
# Essentially lets upstart know the process will detach itself to the background
expect fork
env GODFATHER_ROOT=/usr/local/bin/panacea
export GODFATHER_ROOT
# Run before process
pre-start script
[ -d /var/run/panacea ] || mkdir -p /var/run/panacea
end script
# Start the process
exec /usr/local/bin/panacea/bin/main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment