2 # Start/stop the tuer daemon.
6 # Required-Start: $remote_fs $syslog $time
7 # Required-Stop: $remote_fs $syslog $time
8 # Default-Start: 2 3 4 5
13 test -f /flash/tuer_python/door_daemon.py || exit 0
14 test -f /flash/tuer_python/checkcard.pl || exit 0
16 PIDFILE1=/var/run/door_daemon.pid
17 PIDFILE2=/var/run/checkcard.pid
19 . /lib/lsb/init-functions
21 # Read the system's locale and set cron's locale. This locale
22 # will be inherited by cron (used to set charset of emails)
23 # and tasks running under it.
27 log_daemon_msg "Starting door daemon" "door_daemon"
28 start-stop-daemon --start --quiet --pidfile $PIDFILE1 -b -m --name door_daemon.py --startas /flash/tuer_python/door_daemon.py --
30 log_daemon_msg "Starting door daemon" "checkcard"
31 start-stop-daemon --start --quiet --pidfile $PIDFILE2 -b -m --name checkcard.pl --startas /flash/tuer_python/checkcard.pl --
35 log_daemon_msg "Stopping door daemon" "door_daemon"
36 start-stop-daemon --stop --quiet --pidfile $PIDFILE1 -m --name door_daemon.py
38 log_daemon_msg "Stopping door daemon" "checkcard"
39 start-stop-daemon --stop --quiet --pidfile $PIDFILE2 -m --name checkcard.pl
46 *) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"