Skip to content

Instantly share code, notes, and snippets.

@powellc
Created October 28, 2014 14:29
Show Gist options
  • Save powellc/487e56bbe3c4004bcd72 to your computer and use it in GitHub Desktop.
Save powellc/487e56bbe3c4004bcd72 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
env USER=gogs
script
HOME=/home/$USER
PATH=/sbin:/usr/sbin:/bin:/usr/bin:$GOROOT/bin:$GOPATH/bin
GOGSDIR=$HOME/gogs
export USER HOME GOROOT GOPATH PATH
chdir $GOGSDIR
exec ./gogs web
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment