2 # Start/stop the tuer status updater.
5 # Provides: tuer_status
6 # Required-Start: $remote_fs $syslog $time $tuer_core
7 # Required-Stop: $remote_fs $syslog $time $tuer_core
8 # Default-Start: 2 3 4 5
12 EXE_UWEB=/flash/tuer/update-web-status.py
13 EXE_XMPP=/flash/tuer/update-xmpp-status.py
15 CFG_UWEB=/flash/tuer/update-web-status.cfg
16 CFG_XMPP=/flash/tuer/update-xmpp-status.cfg
20 PIDFILE_UWEB=${DIR_RUN}/update-web-status.pid
21 PIDFILE_XMPP=${DIR_RUN}/update-xmpp-status.pid
23 test -f $EXE_UWEB || exit 1
24 test -f $EXE_XMPP || exit 1
25 if [ ! -d $DIR_RUN ]; then
26 mkdir -p $DIR_RUN || exit 2
27 chown -R $DOOR_USR:$DOOR_GRP $DIR_RUN
30 . /lib/lsb/init-functions
32 # Read the system's locale and set cron's locale. This locale
33 # will be inherited by cron (used to set charset of emails)
34 # and tasks running under it.
38 log_daemon_msg "Starting door daemon" "update-web-status"
39 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
41 log_daemon_msg "Starting door daemon" "update-xmpp-status"
42 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
46 log_daemon_msg "Stopping door daemon" "update-web-status"
47 start-stop-daemon --stop --quiet --pidfile $PIDFILE_UWEB -m --retry TERM/1/TERM/1/KILL
49 log_daemon_msg "Stopping door daemon" "update-xmpp-status"
50 start-stop-daemon --stop --quiet --pidfile $PIDFILE_XMPP -m --retry TERM/1/TERM/1/KILL
57 *) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"