2 # Start/stop the tuer daemon core.
6 # Required-Start: $remote_fs $syslog $time
7 # Required-Stop: $remote_fs $syslog $time
8 # Default-Start: 2 3 4 5
12 EXE_DOOR=/flash/tuer/door_daemon_zmq
17 PIDFILE_DOOR=${DIR_RUN}/door_daemon.pid
19 test -e $EXE_DOOR || exit 1
20 if [ ! -d $DIR_RUN ]; then
21 mkdir -p $DIR_RUN || exit 2
22 chown -R $DOOR_USR:$DOOR_GRP $DIR_RUN
24 chown $DOOR_USR:$DOOR_GRP $DOOR_DEV
26 . /lib/lsb/init-functions
28 # Read the system's locale and set cron's locale. This locale
29 # will be inherited by cron (used to set charset of emails)
30 # and tasks running under it.
34 log_daemon_msg "Starting door daemon" "door_daemon_zmq"
35 start-stop-daemon --start --quiet --pidfile $PIDFILE_DOOR -c $DOOR_USR -m -g $DOOR_GRP -b --name door_daemon_zmq --startas $EXE_DOOR -- --device $DOOR_DEV --cmdport "$DOOR_SOCKET" --syslog
39 log_daemon_msg "Stopping door daemon" "door_daemon_zmq"
40 start-stop-daemon --stop --quiet --pidfile $PIDFILE_DOOR -m --name door_daemon_zmq
47 *) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}"