aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-11-23 20:19:32 +0100
committerficus <ficus@robocracy.org>2012-11-23 20:19:32 +0100
commitf0a6558fad35b16b3aa5a7fe7a1cb7cbf0e1712f (patch)
tree9d21c5556c6e4cbf7e69f78ff84146eff353a0c8
parent1dcf529cbfc61a3b9d59d87e5e95907020d6cf72 (diff)
downloadtorouter-live-f0a6558fad35b16b3aa5a7fe7a1cb7cbf0e1712f.tar.gz
torouter-live-f0a6558fad35b16b3aa5a7fe7a1cb7cbf0e1712f.zip
torouterui only on LAN ethernet
-rwxr-xr-xconfig/includes.chroot/etc/init.d/torouterui46
1 files changed, 46 insertions, 0 deletions
diff --git a/config/includes.chroot/etc/init.d/torouterui b/config/includes.chroot/etc/init.d/torouterui
new file mode 100755
index 0000000..5aa664b
--- /dev/null
+++ b/config/includes.chroot/etc/init.d/torouterui
@@ -0,0 +1,46 @@
+#!/bin/sh -e
+
+### BEGIN INIT INFO
+# Provides: torouterui
+# Required-Start: $local_fs $remote_fs $network
+# Required-Stop: $local_fs $remote_fs $network
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: torouter configuration web interface
+### END INIT INFO
+
+PATH="/sbin:/bin:/usr/sbin:/usr/bin"
+DAEMON=/usr/bin/torouterui
+ARGS="--host 10.23.42.1 --port 80 --lanif eth1 --wanif eth0 --wifiif uap0"
+PIDFILE=/var/run/torouterui.pid
+
+[ -x "$DAEMON" ] || exit 0
+
+. /lib/lsb/init-functions
+
+case "$1" in
+ start)
+ log_daemon_msg "Starting torouter Web Configuration Interface" "torouterui"
+ start-stop-daemon --start -b -m --pidfile $PIDFILE --exec $DAEMON -- $ARGS
+ log_end_msg 0
+ ;;
+ restart|force-reload)
+ $0 stop
+ $0 start
+ ;;
+ stop)
+ log_daemon_msg "Stopping torouter Web Configuration Interface" "torouterui"
+ start-stop-daemon --stop --pidfile $PIDFILE --oknodo
+ log_end_msg 0
+ ;;
+ status)
+ status_of_proc $DAEMON torouterui
+ ;;
+ *)
+ echo "Usage: /etc/init.d/torouterui {start|stop|status}"
+ exit 2
+ ;;
+
+esac
+
+exit 0