Created
September 23, 2013 07:30
-
-
Save svenvarkel/6667427 to your computer and use it in GitHub Desktop.
Bamboo init script for Debian
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: bamboo | |
# Required-Start: $local_fs $remote_fs $network $syslog nginx | |
# Required-Stop: $local_fs $remote_fs $network $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts bamboo server | |
# Description: starts bamboo using start-stop-daemon | |
### END INIT INFO | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMONSTART=/usr/local/lib/bamboo/bin/startup.sh | |
NAME=bamboo | |
DESC=bamboo | |
DAEMONUSER=bamboo | |
PIDFILE=/usr/local/lib/bamboo/work/catalina.pid | |
test -x $DAEMONSTART || exit 0 | |
test -x $DAEMONSTOP || exit 0 | |
set -e | |
. /lib/lsb/init-functions | |
case "$1" in | |
start) | |
echo -n "Starting $DESC: " | |
start-stop-daemon --start --quiet --pidfile $PIDFILE \ | |
--chuid $DAEMONUSER --exec $DAEMONSTART -- $DAEMON_OPTS || true | |
echo "$NAME." | |
;; | |
stop) | |
echo -n "Stopping $DESC: " | |
start-stop-daemon --stop --quiet --pidfile $PIDFILE || true | |
echo "$NAME." | |
;; | |
*) | |
echo "Usage: $NAME {start|stop}" >&2 | |
exit 1 | |
;; | |
esac | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment