fix init.d script for pandora-cron

This commit is contained in:
j 2013-11-04 14:08:48 +00:00
parent 72e760bb8f
commit 9ef6290a64

View file

@ -19,7 +19,7 @@ PANDORA_BASE=/srv/pandora
DAEMON_USER="pandora" DAEMON_USER="pandora"
DAEMON_NAME=pandora/manage.py DAEMON_NAME=pandora/manage.py
DAEMON="$PANDORA_BASE/$DAEMON_NAME" DAEMON="$PANDORA_BASE/$DAEMON_NAME"
DAEMON_ARGS="celerybeat -s /var/run/$NAME-schedule -f /var/log/pandora/$NAME.log -l INFO" DAEMON_ARGS="celerybeat -s /var/run/pandora/celerybeat-schedule -f /var/log/pandora/$NAME.log -l INFO"
PIDFILE=/var/run/$NAME.pid PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME SCRIPTNAME=/etc/init.d/$NAME
@ -45,6 +45,7 @@ do_start()
# 0 if daemon has been started # 0 if daemon has been started
# 1 if daemon was already running # 1 if daemon was already running
# 2 if daemon could not be started # 2 if daemon could not be started
test -e /var/run/pandora || (mkdir -p /var/run/pandora && chown $DAEMON_USER:$DAEMON_USER /var/run/pandora)
test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $DAEMON_USER:$DAEMON_USER /var/log/pandora) test -e /var/log/pandora || (mkdir -p /var/log/pandora && chown $DAEMON_USER:$DAEMON_USER /var/log/pandora)
start-stop-daemon --start --quiet --pidfile $PIDFILE -c $DAEMON_USER \ start-stop-daemon --start --quiet --pidfile $PIDFILE -c $DAEMON_USER \
--exec $DAEMON --test > /dev/null \ --exec $DAEMON --test > /dev/null \