From: realraum Date: Mon, 26 Jul 2010 23:28:57 +0000 (+0000) Subject: neu initscript X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=afb9a794cf6c52dd7ab07de3f147d17aee06f9d8;p=svn42.git neu initscript --- diff --git a/tuer_status.initscript b/tuer_status.initscript index e31b5eb..8bc4821 100755 --- a/tuer_status.initscript +++ b/tuer_status.initscript @@ -13,11 +13,13 @@ EXE_TRACK=/flash/tuer/track-presence.py EXE_UWEB=/flash/tuer/update-web-status.py EXE_XMPP=/flash/tuer/update-xmpp-status.py EXE_SWITCH=/flash/tuer/switch-power.py +EXE_SOUND=/flash/tuer/play-sound-status.py CFG_TRACK=/flash/tuer/track-presence.cfg CFG_UWEB=/flash/tuer/update-web-status.cfg CFG_XMPP=/flash/tuer/update-xmpp-status.cfg CFG_SWITCH=/flash/tuer/switch-power.cfg +CFG_SOUND=/flash/tuer/play-sound-status.cfg . /etc/default/tuer @@ -25,11 +27,13 @@ PIDFILE_TRACK=${DIR_RUN}/track-presence.pid PIDFILE_UWEB=${DIR_RUN}/update-web-status.pid PIDFILE_XMPP=${DIR_RUN}/update-xmpp-status.pid PIDFILE_SWITCH=${DIR_RUN}/switch-power.pid +PIDFILE_SOUND=${DIR_RUN}/play-sound-status.pid test -f $EXE_TRACK || exit 1 test -f $EXE_UWEB || exit 1 test -f $EXE_XMPP || exit 1 test -f $EXE_SWITCH || exit 1 +test -f $EXE_SOUND || exit 1 if [ ! -d $DIR_RUN ]; then mkdir -p $DIR_RUN || exit 2 chown -R $DOOR_USR:$DOOR_GRP $DIR_RUN @@ -55,6 +59,9 @@ start) log_daemon_msg "Starting door daemon" "switch-power" start-stop-daemon --start --quiet --pidfile $PIDFILE_SWITCH -b -m -c $DOOR_USR --name update-xmpp-status.py --startas $EXE_SWITCH -- $CFG_SWITCH log_end_msg $? + log_daemon_msg "Starting door daemon" "play-sound" + start-stop-daemon --start --quiet --pidfile $PIDFILE_SOUND -b -m -c $DOOR_USR --name update-xmpp-status.py --startas $EXE_SOUND -- $CFG_SOUND + log_end_msg $? ;; stop) log_daemon_msg "Stopping door daemon" "update-web-status" @@ -66,6 +73,9 @@ stop) log_daemon_msg "Stopping door daemon" "switch-power" start-stop-daemon --stop --quiet --pidfile $PIDFILE_SWITCH -m --retry TERM/1/TERM/1/KILL log_end_msg $? + log_daemon_msg "Stopping door daemon" "play-sound" + start-stop-daemon --stop --quiet --pidfile $PIDFILE_SOUND -m --retry TERM/1/TERM/1/KILL + log_end_msg $? log_daemon_msg "Stopping door daemon" "track-presence" start-stop-daemon --stop --quiet --pidfile $PIDFILE_TRACK -m --retry TERM/1/TERM/1/KILL log_end_msg $?