linknx: add init file
authorOthmar Truniger <tru7@users.noreply.github.com>
Wed, 31 Dec 2014 09:20:11 +0000 (10:20 +0100)
committerOthmar Truniger <tru7@users.noreply.github.com>
Wed, 31 Dec 2014 09:20:11 +0000 (10:20 +0100)
Signed-off-by: Othmar Truniger <github@truniger.ch>
net/linknx/files/linknx.init [new file with mode: 0644]

diff --git a/net/linknx/files/linknx.init b/net/linknx/files/linknx.init
new file mode 100644 (file)
index 0000000..574bf41
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh /etc/rc.common
+# Copyright (C) 2006 OpenWrt.org
+
+START=98
+STOP=10
+NAME=linknx
+PROG=/usr/bin/$NAME
+
+. /lib/functions.sh
+
+start() {
+        local conf options
+        config_load "$NAME"
+        config_get conf args conf '/etc/linknx.xml'
+        config_get options args options ''
+        test -f $conf || cp -p /etc/linknx.xml.dist $conf
+        service_start $PROG --config=$conf $options
+}
+
+stop() {
+        service_stop $PROG
+}