Last active
August 9, 2016 10:04
-
-
Save nathanborror/89f5d10e5e6e3c1243a2 to your computer and use it in GitHub Desktop.
This file contains 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
description "start and stop the go program 'my-project'" | |
start on filesystem or runlevel [2345] | |
stop on runlevel [!2345] | |
env USER='ubuntu' | |
env APP_DIR='/home/ubuntu/go/src/github.com/your-username/your-project-name/' | |
env APP_EXEC='your-project-name' | |
exec start-stop-daemon —start —chuid ${USER} —chdir ${APP_DIR} —exec ${APP_DIR}${APP_EXEC} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had to change your
exec start-stop-daemon —start —chuid ${USER} —chdir ${APP_DIR} —exec ${APP_DIR}${APP_EXEC}
with (-- instead of —)
exec start-stop-daemon --start --chuid ${USER} --chdir ${APP_DIR} --exec ${APP_DIR}${APP_EXEC}