summaryrefslogtreecommitdiffstats
path: root/contrib/bugzilla-queue
diff options
context:
space:
mode:
authorKent Rogers <kar@cray.com>2010-05-19 19:15:41 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-05-19 19:15:41 +0200
commit4095f06769a8fb3ce0878209508a6f129b099d91 (patch)
tree62c4a90141025d1417ee3b83e33c9ba3e775935a /contrib/bugzilla-queue
parent6debb025873ef6df5328a01ed1d4b4848866a91a (diff)
downloadbugzilla-4095f06769a8fb3ce0878209508a6f129b099d91.tar.gz
bugzilla-4095f06769a8fb3ce0878209508a6f129b099d91.tar.xz
Bug 563641: Make bugzilla-queue init script support SuSE
r=mkanat, a=mkanat
Diffstat (limited to 'contrib/bugzilla-queue')
-rwxr-xr-xcontrib/bugzilla-queue109
1 files changed, 0 insertions, 109 deletions
diff --git a/contrib/bugzilla-queue b/contrib/bugzilla-queue
deleted file mode 100755
index 3e00cce24..000000000
--- a/contrib/bugzilla-queue
+++ /dev/null
@@ -1,109 +0,0 @@
-#!/bin/bash
-#
-# bugzilla-queue This starts, stops, and restarts the Bugzilla jobqueue.pl
-# daemon, which manages sending queued mail and possibly
-# other queued tasks in the future.
-#
-# chkconfig: 345 85 15
-# description: Bugzilla queue runner
-#
-### BEGIN INIT INFO
-# Provides: bugzilla-queue
-# Required-Start: $local_fs $syslog MTA mysqld
-# Required-Stop: $local_fs $syslog MTA mysqld
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: Start and stop the Bugzilla queue runner.
-# Description: The Bugzilla queue runner (jobqueue.pl) sends any mail
-# that Bugzilla has queued to be sent in the background. If you
-# have enabled the use_mailer_queue parameter in Bugzilla, you
-# must run this daemon.
-### END INIT INFO
-
-NAME=`basename $0`
-
-#################
-# Configuration #
-#################
-
-# This should be the path to your Bugzilla
-BUGZILLA=/var/www/html/bugzilla
-# Who owns the Bugzilla directory and files?
-USER=root
-
-# If you want to pass any options to the daemon (like -d for debugging)
-# specify it here.
-OPTIONS=""
-
-# You can also override the configuration by creating a
-# /etc/sysconfig/bugzilla-queue file so that you don't
-# have to edit this script.
-if [ -r /etc/sysconfig/$NAME ]; then
- . /etc/sysconfig/$NAME
-fi
-
-##########
-# Script #
-##########
-
-RETVAL=0
-BIN=$BUGZILLA/jobqueue.pl
-PIDFILE=/var/run/$NAME.pid
-
-# Source function library.
-. /etc/rc.d/init.d/functions
-
-usage ()
-{
- echo "Usage: service $NAME {start|stop|status|restart|condrestart}"
- RETVAL=1
-}
-
-
-start ()
-{
- if [ -f "$PIDFILE" ]; then
- checkpid `cat $PIDFILE` && return 0
- fi
- echo -n "Starting $NAME: "
- touch $PIDFILE
- chown $USER $PIDFILE
- daemon --user=$USER \
- "$BIN ${OPTIONS} -p '$PIDFILE' -n $NAME start > /dev/null"
- ret=$?
- [ $ret -eq "0" ] && touch /var/lock/subsys/$NAME
- echo
- return $ret
-}
-
-stop ()
-{
- [ -f /var/lock/subsys/$NAME ] || return 0
- echo -n "Killing $NAME: "
- killproc $NAME
- echo
- rm -f /var/lock/subsys/$NAME
-}
-
-restart ()
-{
- stop
- start
-}
-
-condrestart ()
-{
- [ -e /var/lock/subsys/$NAME ] && restart || return 0
-}
-
-
-case "$1" in
- start) start; RETVAL=$? ;;
- stop) stop; RETVAL=$? ;;
- status) $BIN -p $PIDFILE -n $NAME check; RETVAL=$?;;
- restart) restart; RETVAL=$? ;;
- condrestart) condrestart; RETVAL=$? ;;
- *) usage ; RETVAL=2 ;;
-esac
-
-exit $RETVAL