From 60db74ff3b8e5dfe6e9d15991d090451eadc32cd Mon Sep 17 00:00:00 2001 From: realraum Date: Fri, 11 Sep 2009 13:49:34 +0000 Subject: [PATCH] initscript update --- tuer.initscript | 4 +++- tuer_init_py | 51 --------------------------------------------------- 2 files changed, 3 insertions(+), 52 deletions(-) delete mode 100755 tuer_init_py diff --git a/tuer.initscript b/tuer.initscript index ecc1261..ba7a0f5 100755 --- a/tuer.initscript +++ b/tuer.initscript @@ -14,6 +14,8 @@ EXE_CARD=/flash/tuer/checkcard.pl EXE_UWEB=/flash/tuer/update-web-status.py DIR_RUN=/var/run/tuer +CFG_UWEB=/flash/tuer/update-web-status.cfg + DOOR_SOCKET=${DIR_RUN}/door_cmd.socket DOOR_DEV=/dev/door DOOR_LOG="--log syslog:3,door_daemon,local1" @@ -49,7 +51,7 @@ start) #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 + start-stop-daemon --start --quiet --pidfile $PIDFILE3 -b -m -c $DOOR_USR --name update-web-status.py --startas $EXE_UWEB -- $DOOR_SOCKET $CFG_UWEB log_end_msg $? ;; stop) diff --git a/tuer_init_py b/tuer_init_py deleted file mode 100755 index 063e1ac..0000000 --- a/tuer_init_py +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/sh -# Start/stop the tuer daemon. -# -### BEGIN INIT INFO -# Provides: tuer -# Required-Start: $remote_fs $syslog $time -# Required-Stop: $remote_fs $syslog $time -# Default-Start: 2 3 4 5 -# Default-Stop: 1 -### END INIT INFO - - -test -f /flash/tuer_python/door_daemon.py || exit 0 -test -f /flash/tuer_python/checkcard.pl || exit 0 - -PIDFILE1=/var/run/door_daemon.pid -PIDFILE2=/var/run/checkcard.pid - -. /lib/lsb/init-functions - -# Read the system's locale and set cron's locale. This locale -# will be inherited by cron (used to set charset of emails) -# and tasks running under it. - -case "$1" in -start) - log_daemon_msg "Starting door daemon" "door_daemon" - start-stop-daemon --start --quiet --pidfile $PIDFILE1 -b -m --name door_daemon.py --startas /flash/tuer_python/door_daemon.py -- - log_end_msg $? - log_daemon_msg "Starting door daemon" "checkcard" - start-stop-daemon --start --quiet --pidfile $PIDFILE2 -b -m --name checkcard.pl --startas /flash/tuer_python/checkcard.pl -- - log_end_msg $? - ;; -stop) - log_daemon_msg "Stopping door daemon" "door_daemon" - start-stop-daemon --stop --quiet --pidfile $PIDFILE1 -m --name door_daemon.py - log_end_msg $? - log_daemon_msg "Stopping door daemon" "checkcard" - start-stop-daemon --stop --quiet --pidfile $PIDFILE2 -m --name checkcard.pl - log_end_msg $? - killall "mifare-read" 2>/dev/null - ;; -restart) - $0 stop - $0 start - ;; -*) log_action_msg "Usage: $0 {start|stop|restart|reload|force-reload}" - exit 2 - ;; -esac -exit 0 -- 1.7.10.4