From: Andrew 'Necromant' Andrianov Date: Wed, 25 Feb 2015 11:25:11 +0000 (+0300) Subject: Add initscript, fix shell of serverctl X-Git-Tag: v0.1~15 X-Git-Url: http://git.linex4red.de/pub/pl2303-ft232-gpio.git/commitdiff_plain/71433d03d9bf61aafb82ed566bd5e00510fc73f7?ds=inline Add initscript, fix shell of serverctl Signed-off-by: Andrew 'Necromant' Andrianov --- 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 +} + +