Skip to content

Instantly share code, notes, and snippets.

@goodfeel
Created September 22, 2014 02:01
Show Gist options
  • Save goodfeel/75416c947ced1d664c8c to your computer and use it in GitHub Desktop.
Save goodfeel/75416c947ced1d664c8c to your computer and use it in GitHub Desktop.
Start Gin as a process at startup using upstart on Ubuntu
start on started network
stop on stopping network
kill signal INT
respawn
script
export GOROOT=/home/ton/go
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$GOROOT/bin
export GOPATH=$GOROOT/gocode
PATH=$PATH:$GOPATH/bin
chdir $GOPATH/src/github.com/<path to your Go scripts directory>
exec gin
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment