From 71433d03d9bf61aafb82ed566bd5e00510fc73f7 Mon Sep 17 00:00:00 2001 From: Andrew 'Necromant' Andrianov Date: Wed, 25 Feb 2015 14:25:11 +0300 Subject: [PATCH] Add initscript, fix shell of serverctl Signed-off-by: Andrew 'Necromant' Andrianov --- etc/init.d/serverd | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 etc/init.d/serverd diff --git a/etc/init.d/serverd b/etc/init.d/serverd new file mode 100755 index 0000000..adc541f --- /dev/null +++ b/etc/init.d/serverd @@ -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 +} + + -- 2.11.0