Add bugzilla job daemon

master
Vitaliy Filippov 2017-12-27 20:50:49 +03:00
parent 35ae454ebc
commit 952249491c
2 changed files with 46 additions and 0 deletions

45
etc/init.d/bugzilla-jobs Executable file
View File

@ -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

View File

@ -5,6 +5,7 @@ export LC_ALL=ru_RU.UTF-8 LANG=ru_RU.UTF-8
service sphinxsearch start
service mysql start
service bugzilla start
service bugzilla-jobs start
# Keep container running
tail -fn0 /dev/null