summaryrefslogtreecommitdiff
path: root/openwrt/rhctl/files
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2009-11-09 17:07:17 (GMT)
committerChristian Pointner <equinox@helsinki.at>2009-11-09 17:07:17 (GMT)
commit68d3b7892deb793f2d911bf825fb3e6116267c24 (patch)
tree6f001104a4aa724a9a8724fa13f522e92c17d705 /openwrt/rhctl/files
parentf52938f7456d51577fbd1ba8e93a327cc818f095 (diff)
cleaned up configure script
fixed spelling error added inital openwrt package
Diffstat (limited to 'openwrt/rhctl/files')
-rwxr-xr-xopenwrt/rhctl/files/rhctlsh6
-rw-r--r--openwrt/rhctl/files/switchctl.conf6
-rwxr-xr-xopenwrt/rhctl/files/switchctl.init26
3 files changed, 38 insertions, 0 deletions
diff --git a/openwrt/rhctl/files/rhctlsh b/openwrt/rhctl/files/rhctlsh
new file mode 100755
index 0000000..47d5873
--- /dev/null
+++ b/openwrt/rhctl/files/rhctlsh
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+RUN_D=/var/run/rhctl
+SOCK=$RUN_D/switchctl.sock
+
+/usr/bin/socat UNIX-CONNECT:$SOCK STDIO
diff --git a/openwrt/rhctl/files/switchctl.conf b/openwrt/rhctl/files/switchctl.conf
new file mode 100644
index 0000000..0364e0d
--- /dev/null
+++ b/openwrt/rhctl/files/switchctl.conf
@@ -0,0 +1,6 @@
+master_main 01
+master_music 02
+standby_main 03
+standby_music 04
+studio 05
+ext_studio 06
diff --git a/openwrt/rhctl/files/switchctl.init b/openwrt/rhctl/files/switchctl.init
new file mode 100755
index 0000000..c463f40
--- /dev/null
+++ b/openwrt/rhctl/files/switchctl.init
@@ -0,0 +1,26 @@
+#!/bin/sh /etc/rc.common
+START=50
+
+BIN=switchctl
+DAEMON=/usr/bin/$BIN
+DESC=$BIN
+RUN_D=/var/run/rhctl
+PIDFILE=$RUN_D/$BIN.pid
+
+start() {
+ echo -n "Starting $DESC:"
+ mkdir -p $RUN_D
+ $DAEMON --write-pid $PIDFILE
+ echo "."
+}
+
+stop() {
+ echo -n "Stopping $DESC:"
+ if [ -f $PIDFILE ]; then
+ kill `cat $PIDFILE` > /dev/null 2>&1
+ rm -f $PIDFILE > /dev/null 2>&1
+ else
+ echo -n "not running"
+ fi
+ echo "."
+}