EXE_DOOR=/flash/tuer/door_daemon
EXE_CARD=/flash/tuer/checkcard.pl
-EXE_UWEB=/flash/tuer/update_web_status.py
+EXE_UWEB=/flash/tuer/update-web-status.py
DIR_RUN=/var/run/tuer
DOOR_SOCKET=${DIR_RUN}/door_cmd.socket
DOOR_DEV=/dev/door
-#DOOR_LOG=/var/log/tmp/tuer.log
+DOOR_LOG="--log syslog:3,door_daemon,local1"
DOOR_USR=tuer
DOOR_GRP=nogroup
#DOOR_HOME=$DIR_RUN
case "$1" in
start)
log_daemon_msg "Starting door daemon" "door_daemon"
- start-stop-daemon --start --quiet --pidfile $PIDFILE1 --name door_daemon --startas $EXE_DOOR -- -d $DOOR_DEV -s $DOOR_SOCKET -u $DOOR_USR -g $DOOR_GRP -P $PIDFILE1
+ start-stop-daemon --start --quiet --pidfile $PIDFILE1 --name door_daemon --startas $EXE_DOOR -- -d $DOOR_DEV -s $DOOR_SOCKET -u $DOOR_USR -g $DOOR_GRP -P $PIDFILE1 $DOOR_LOG
log_end_msg $?
log_daemon_msg "Starting door daemon" "checkcard"
start-stop-daemon --start --quiet --pidfile $PIDFILE2 -b -m --name checkcard.pl --startas $EXE_CARD -- $DOOR_SOCKET
#start-stop-daemon --start --quiet --pidfile $PIDFILE2 -c $DOOR_USR -b -m --name checkcard.pl --startas $EXE_CARD -- $DOOR_SOCKET
log_end_msg $?
- log_daemon_msg "Starting door daemon" "update_web_status"
- start-stop-daemon --start --quiet --pidfile $PIDFILE3 -b -m -c $DOOR_USR --name update_web_status.py --startas $EXE_UWEB -- $DOOR_SOCKET
+ log_daemon_msg "Starting door daemon" "update-web-status"
+ start-stop-daemon --start --quiet --pidfile $PIDFILE3 -b -m -c $DOOR_USR --name update-web-status.py --startas $EXE_UWEB -- $DOOR_SOCKET
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping door daemon" "checkcard"
start-stop-daemon --stop --quiet --pidfile $PIDFILE2 -m --name checkcard.pl
log_end_msg $?
- log_daemon_msg "Stopping door daemon" "update_web_status"
+ log_daemon_msg "Stopping door daemon" "update-web-status"
start-stop-daemon --stop --quiet --pidfile $PIDFILE3 -m --name update_web_status.py
log_end_msg $?
killall "mifare-read" 2>/dev/null