Created
October 17, 2014 17:04
-
-
Save sergeyt/5aa95e017b4005455b4d to your computer and use it in GitHub Desktop.
gogs upstart script
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
# | |
# upstart script for gogs (Go Git Service) | |
# | |
author "tsv" | |
description "gogs upstart script" | |
start on (local-filesystems and net-device-up) | |
stop on shutdown | |
console output | |
env USER=azureuser | |
script | |
HOME=/home/$USER | |
GOROOT=$HOME/go | |
GOPATH=$HOME/gobits | |
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$GOROOT/bin:$GOPATH/bin | |
GOGSDIR=$GOPATH/src/github.com/gogits/gogs | |
export USER HOME GOROOT GOPATH PATH | |
chdir $GOGSDIR | |
exec sudo ./gogs web | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment