diff options
Diffstat (limited to 'package/brutefir')
-rw-r--r-- | package/brutefir/files/brutefir.init | 28 | ||||
-rw-r--r-- | package/brutefir/files/brutefir.postinst | 4 |
2 files changed, 32 insertions, 0 deletions
diff --git a/package/brutefir/files/brutefir.init b/package/brutefir/files/brutefir.init new file mode 100644 index 000000000..b3a85aa76 --- /dev/null +++ b/package/brutefir/files/brutefir.init @@ -0,0 +1,28 @@ +#!/bin/sh +#PKG brutefir +#INIT 79 +. /etc/rc.conf + +case $1 in +autostop) ;; +autostart) + test x"${brutefir:-NO}" = x"NO" && exit 0 + test x"$brutefir" = x"DAEMON" && test -x /bin/mksh && exec mksh -T- $0 start + exec sh $0 start + ;; +start) + (/usr/bin/brutefir $brutefir_flags &) && sleep 0.2 + ;; +stop) + kill $(pgrep -f /usr/bin/brutefir) && sleep 0.2 + ;; +restart) + sh $0 stop + sh $0 start + ;; +*) + echo "Usage: $0 {start | stop | restart}" + exit 1 + ;; +esac +exit $? diff --git a/package/brutefir/files/brutefir.postinst b/package/brutefir/files/brutefir.postinst new file mode 100644 index 000000000..d78a782ef --- /dev/null +++ b/package/brutefir/files/brutefir.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +. $IPKG_INSTROOT/etc/functions.sh +add_rcconf brutefir NO +add_rcconf brutefir_flags '-nodefault -daemon /data/brutefir/config/brutefir.conf' |