Add initscript, fix shell of serverctl
authorAndrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Wed, 25 Feb 2015 11:25:11 +0000 (14:25 +0300)
committerAndrew 'Necromant' Andrianov <andrew@ncrmnt.org>
Wed, 25 Feb 2015 11:25:11 +0000 (14:25 +0300)
Signed-off-by: Andrew 'Necromant' Andrianov <andrew@ncrmnt.org>
etc/init.d/serverd [new file with mode: 0755]

diff --git a/etc/init.d/serverd b/etc/init.d/serverd
new file mode 100755 (executable)
index 0000000..adc541f
--- /dev/null
@@ -0,0 +1,25 @@
+#!/bin/sh /etc/rc.common
+# ServerD daemon
+# Copyright (C) 2015 Andrew 'Necromant' Andrianov
+START=10
+STOP=15
+
+start() { 
+        cd /
+        exec >/dev/null
+        exec 2>/dev/null
+        (
+        trap "" TERM
+        /usr/bin/serverd.lua
+        ) &        
+        #setsid "/usr/bin/fastbootd $FILE" >/dev/null 2>&1 < /dev/null &
+        # commands to launch application
+}                 
+stop() {          
+        killall serverd.lua
+        # commands to kill application 
+}
+
+