#!/bin/bash # # /etc/rc.d/init.d/roundup # # Starts the roundup daemon # # chkconfig: - 95 5 # description: Bug tracking system. # processname: roundup # Source function library. . /etc/init.d/functions test -x /usr/bin/roundup-server || exit 0 RETVAL=0 # # See how we were called. # prog="roundup-server" start() { # Check if roundup is already running if [ ! -f /var/lock/subsys/roundup ]; then echo -n $"Starting $prog: " daemon /usr/bin/roundup-server -d /var/run/roundup-server.pid -u roundup -g roundup -p 8080 issues=/var/lib/roundup/trackers/default RETVAL=$? [ $RETVAL -eq 0 ] && touch /var/lock/subsys/roundup echo fi return $RETVAL } stop() { echo -n $"Stopping $prog: " killproc /usr/bin/roundup-server RETVAL=$? [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/roundup echo return $RETVAL } restart() { stop start } reload() { restart } status_roundup() { status /usr/bin/roundup-server } case "$1" in start) start ;; stop) stop ;; reload|restart) restart ;; condrestart) if [ -f /var/lock/subsys/roundup ]; then restart fi ;; status) status_roundup ;; *) echo $"Usage: $0 {start|stop|restart|condrestart|status}" exit 1 esac exit $? exit $RETVAL