Add bugzilla job daemon
parent
35ae454ebc
commit
952249491c
|
@ -0,0 +1,45 @@
|
||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: bugzilla-jobs
|
||||||
|
# Required-Start: $local_fs $remote_fs $network $syslog
|
||||||
|
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||||
|
# Should-Start: bugzilla
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 0 1 6
|
||||||
|
# Short-Description: Start/stop Bugzilla job queue.
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
|
PATH=/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
NAME=bugzilla-jobs
|
||||||
|
DIR=/home/bugzilla
|
||||||
|
CONFIG=/etc/bugzilla-http.conf
|
||||||
|
USER=`grep ^user $CONFIG | awk '{print $2}'`
|
||||||
|
|
||||||
|
. /lib/lsb/init-functions
|
||||||
|
|
||||||
|
export LANG=en_US.UTF-8
|
||||||
|
export LC_ALL=en_US.UTF-8
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
log_daemon_msg "Starting Bugzilla job queue" $NAME
|
||||||
|
su $USER -s /bin/sh -c "$DIR/jobqueue.pl start"
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
stop)
|
||||||
|
log_daemon_msg "Stopping Bugzilla job queue" $NAME
|
||||||
|
su $USER -s /bin/sh -c "$DIR/jobqueue.pl stop"
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
restart|force-reload)
|
||||||
|
log_daemon_msg "Restarting Bugzilla job queue" $NAME
|
||||||
|
su $USER -s /bin/sh -c "$DIR/jobqueue.pl restart"
|
||||||
|
log_end_msg $?
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|force-reload}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
exit 0
|
|
@ -5,6 +5,7 @@ export LC_ALL=ru_RU.UTF-8 LANG=ru_RU.UTF-8
|
||||||
service sphinxsearch start
|
service sphinxsearch start
|
||||||
service mysql start
|
service mysql start
|
||||||
service bugzilla start
|
service bugzilla start
|
||||||
|
service bugzilla-jobs start
|
||||||
|
|
||||||
# Keep container running
|
# Keep container running
|
||||||
tail -fn0 /dev/null
|
tail -fn0 /dev/null
|
||||||
|
|
Loading…
Reference in New Issue