Created
March 16, 2015 17:48
-
-
Save jaytaylor/c13fb92a831339ad7e9c to your computer and use it in GitHub Desktop.
Gitbucket (for JAR releases from: https://github.com/takezoe/gitbucket, located in /home/ubuntu/gitbucket/gitbucker.war).
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
#!upstart | |
description "gitbucket" | |
env USER=ubuntu | |
env PID=/var/run/gitbucket.pid | |
env STDOUT=/var/log/gitbucket/gitbucket.log | |
env STDERR=/var/log/gitbucket/gitbucket.err | |
start on (local-filesystems and net-device-up IFACE!=lo) | |
stop on [!12345] | |
respawn | |
console log | |
script | |
mkdir -p "$(dirname $STDOUT)" | |
chown -R $USER:$USER "$(dirname $STDOUT)" | |
echo $$ > $PID | |
cd "/home/${USER}/gitbucket" | |
exec sudo -u "${USER}" java -jar gitbucket.war 1>>$STDOUT 2>>$STDERR | |
end script | |
post-stop script | |
rm -f $PID | |
exec sleep 5 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment