Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Gitbucket (for JAR releases from:, located in /home/ubuntu/gitbucket/gitbucker.war).
description "gitbucket"
env USER=ubuntu
env PID=/var/run/
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]
console log
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
You can’t perform that action at this time.