2 # Start/stop the tuer status updater.
5 # Provides: tuer_presence
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_TRACK=/flash/tuer/track-presence.py
14 CFG_TRACK=/flash/tuer/track-presence.cfg
18 PIDFILE_TRACK=${DIR_RUN}/track-presence.pid
19 test -f $EXE_TRACK || exit 1
20 if [ ! -d $DIR_RUN ]; then
21 mkdir -p $DIR_RUN || exit 2
22 chown -R $DOOR_USR:$DOOR_GRP $DIR_RUN
25 . /lib/lsb/init-functions
27 # Read the system's locale and set cron's locale. This locale
28 # will be inherited by cron (used to set charset of emails)
29 # and tasks running under it.
33 log_daemon_msg "Starting door daemon" "track-presence"
34 start-stop-daemon --start --quiet --pidfile $PIDFILE_TRACK -b -m -c $DOOR_USR --name track-presence.py --startas $EXE_TRACK -- $CFG_TRACK
38 log_daemon_msg "Stopping door daemon" "track-presence"
39 start-stop-daemon --stop --quiet --pidfile $PIDFILE_TRACK -m --retry TERM/1/TERM/1/KILL
46 *) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"