-
-
Save svenvarkel/6667423 to your computer and use it in GitHub Desktop.
JIRA service 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: jira | |
# 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 jira server | |
# Description: starts jira using start-stop-daemon | |
### END INIT INFO | |
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin | |
DAEMONSTART=/usr/local/lib/jira/bin/startup.sh | |
NAME=jira | |
DESC=jira | |
DAEMONUSER=jira | |
PIDFILE=/usr/local/lib/jira/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