# 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
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)
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