2 # Start/stop the tuer status updater.
5 # Provides: tuer_status
6 # Required-Start: $remote_fs $syslog $time tuer_core tuer_presence
7 # Required-Stop: $remote_fs $syslog $time tuer_core tuer_presence
8 # Default-Start: 2 3 4 5
12 EXE_UWEB=/flash/tuer/r3-netstatus
13 STATE_DIR=/flash/var/lib/r3netstatus/
18 [ -n "$XMPPJID" ] && CFG_UWEB="$CFG_UWEB --xjid $XMPPJID"
19 [ -n "$XMPPPASS" ] && CFG_UWEB="$CFG_UWEB --xpass $XMPPPASS"
20 [ -n "$XMPPBOTAUTH" ] && CFG_UWEB="$CFG_UWEB --xbotauth $XMPPBOTAUTH"
21 [ -n "$PRESENCE_SOCKET" ] && CFG_UWEB="$CFG_UWEB --presencesocket $PRESENCE_SOCKET"
24 PIDFILE_UWEB=${DIR_RUN}/r3-netstatus.pid
26 test -f $EXE_UWEB || exit 1
27 if [ ! -d $DIR_RUN ]; then
28 mkdir -p $DIR_RUN || exit 2
29 chown -R $DOOR_USR:$DOOR_GRP $DIR_RUN
32 if [ ! -d $STATE_DIR ]; then
33 mkdir -p $STATE_DIR || exit 2
34 chown -R $DOOR_USR:$DOOR_GRP $STATE_DIR
37 . /lib/lsb/init-functions
39 # Read the system's locale and set cron's locale. This locale
40 # will be inherited by cron (used to set charset of emails)
41 # and tasks running under it.
45 log_daemon_msg "Starting door daemon" "update-web-status"
46 start-stop-daemon --start --quiet --pidfile $PIDFILE_UWEB -b -m -c $DOOR_USR --startas $EXE_UWEB -- $CFG_UWEB
50 log_daemon_msg "Stopping door daemon" "update-web-status"
51 start-stop-daemon --stop --quiet --pidfile $PIDFILE_UWEB -m --retry TERM/1/TERM/1/KILL
58 *) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"