Skip to content

Instantly share code, notes, and snippets.

@sergeyt
Created October 17, 2014 17:04
Show Gist options
  • Save sergeyt/5aa95e017b4005455b4d to your computer and use it in GitHub Desktop.
Save sergeyt/5aa95e017b4005455b4d to your computer and use it in GitHub Desktop.
gogs upstart script
#
# 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