From fdb7e6d6e9e0df5f050c8686029d64b65eb8190a Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Fri, 5 Mar 2010 12:52:31 +0000 Subject: [PATCH] tuer_status.initscript angepasst --- tuer_status.initscript | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/tuer_status.initscript b/tuer_status.initscript index bad4806..af584fd 100755 --- a/tuer_status.initscript +++ b/tuer_status.initscript @@ -9,17 +9,21 @@ # Default-Stop: 1 ### END INIT INFO +EXE_TRACK=/flash/tuer/track-presence.py EXE_UWEB=/flash/tuer/update-web-status.py EXE_XMPP=/flash/tuer/update-xmpp-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 . /etc/default/tuer +PIDFILE_TRACK=${DIR_RUN}/track-presence.pid PIDFILE_UWEB=${DIR_RUN}/update-web-status.pid PIDFILE_XMPP=${DIR_RUN}/update-xmpp-status.pid +test -f $EXE_TRACK || exit 1 test -f $EXE_UWEB || exit 1 test -f $EXE_XMPP || exit 1 if [ ! -d $DIR_RUN ]; then @@ -35,11 +39,14 @@ fi case "$1" in start) + log_daemon_msg "Starting door daemon" "track-presence" + start-stop-daemon --start --quiet --pidfile $PIDFILE_TRACK -b -m -c $DOOR_USR --name track-presence.py --startas $EXE_TRACK -- $CFG_TRACK + log_end_msg $? log_daemon_msg "Starting door daemon" "update-web-status" - start-stop-daemon --start --quiet --pidfile $PIDFILE_UWEB -b -m -c $DOOR_USR --name update-web-status.py --startas $EXE_UWEB -- $DOOR_SOCKET $CFG_UWEB + start-stop-daemon --start --quiet --pidfile $PIDFILE_UWEB -b -m -c $DOOR_USR --name update-web-status.py --startas $EXE_UWEB -- $CFG_UWEB log_end_msg $? log_daemon_msg "Starting door daemon" "update-xmpp-status" - start-stop-daemon --start --quiet --pidfile $PIDFILE_XMPP -b -m -c $DOOR_USR --name update-xmpp-status.py --startas $EXE_XMPP -- $DOOR_SOCKET $CFG_XMPP + start-stop-daemon --start --quiet --pidfile $PIDFILE_XMPP -b -m -c $DOOR_USR --name update-xmpp-status.py --startas $EXE_XMPP -- $CFG_XMPP log_end_msg $? ;; stop) @@ -49,6 +56,9 @@ stop) log_daemon_msg "Stopping door daemon" "update-xmpp-status" start-stop-daemon --stop --quiet --pidfile $PIDFILE_XMPP -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 $? ;; restart) $0 stop -- 1.7.10.4