--- /dev/null
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: vendserver
+# Required-Start: $syslog
+# Required-Stop: $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: VendServer
+# Description: Dispense2 Vending Machine / MIFARE Server
+### END INIT INFO
+
+# Author: Bob Adamson
+
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games
+DESC="VendServer"
+NAME=vendserver
+DAEMON="/usr/local/uccvend-vendserver/VendServer/VendServer.py"
+PIDFILE=/var/run/$NAME.pid
+SCRIPTNAME=/etc/init.d/$NAME
+DAEMON_ARGS=""
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+d_start() {
+ start-stop-daemon --start --quiet --pidfile $PIDFILE \
+ --nicelevel 5 \
+ --exec $DAEMON -- -d -sdaemon --pid-file=$PIDFILE \
+ $DAEMON_ARGS
+}
+
+d_stop() {
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE \
+ --name $NAME
+}
+
+case "$1" in
+ start)
+ echo -n "Starting $DESC: $NAME"
+ d_start
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping $DESC: $NAME"
+ d_stop
+ echo "."
+ ;;
+ restart|force-reload)
+ echo -n "Restarting $DESC: $NAME"
+ d_stop
+ sleep 1
+ d_start
+ echo "."
+ ;;
+ *)
+ echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
+ exit 1
+ ;;
+esac
+
+exit 0
universal = 1
[install]
-root=/usr/local/uccvend-vendserver
-install-lib=/
-install-scripts=/
+root=/
+install-lib=/usr/local/uccvend-vendserver
+install-scripts=/usr/local/uccvend-vendserver
#!/usr/bin/env python
# -*- coding: utf-8 -*-
+import os
try:
from setuptools import setup
],
package_dir={'VendServer':
'VendServer'},
+ data_files = [
+ (
+ os.path.join('/etc', 'init.d'),
+ ['bin/init.d/vendserver',
+ ]
+ )
+ ],
include_package_data=True,
install_requires=requirements,
license="BSD",