4 # Required-Start: $syslog
5 # Required-Stop: $syslog
6 # Default-Start: 2 3 4 5
8 # Short-Description: VendServer
9 # Description: Dispense2 Vending Machine / MIFARE Server
14 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games
17 DAEMON="/usr/local/uccvend-vendserver/vendserver"
18 PIDFILE=/var/run/$NAME.pid
19 TBFILE=/var/run/vendtraces.log
20 SCRIPTNAME=/etc/init.d/$NAME
23 # Say something and gracefully exit if the package has been removed.
24 if ! test -x $DAEMON; then
25 echo "Failed to find the executable $DAEMON"
31 start-stop-daemon --start --pidfile $PIDFILE --nicelevel 5 \
32 --startas $DAEMON -- -d -sdaemon --pid-file=$PIDFILE \
33 --traceback-file=$TBFILE $DAEMON_ARGS
37 start-stop-daemon --stop --pidfile $PIDFILE
42 echo -n "Starting $DESC: $NAME\n"
47 echo -n "Stopping $DESC: $NAME\n"
52 echo -n "Restarting $DESC: $NAME\n"
59 echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2