Last active
December 29, 2015 20:09
-
-
Save enmanuelr/7721603 to your computer and use it in GitHub Desktop.
Attempt at creating an upstart service
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
# 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