X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=openwrt%2Fpackage%2Fchillispot%2Fipkg%2Fchillispot.init;fp=openwrt%2Fpackage%2Fchillispot%2Fipkg%2Fchillispot.init;h=289b1fe8a5519e693f9591ced17853fa452121c0;hb=2b5618fd9d7e7ac1a0c3b5f1c8fd290271baefcc;hp=0000000000000000000000000000000000000000;hpb=ed487fe96351920a80ad74725e4e4e144f040275;p=openwrt.git diff --git a/openwrt/package/chillispot/ipkg/chillispot.init b/openwrt/package/chillispot/ipkg/chillispot.init new file mode 100644 index 0000000000..289b1fe8a5 --- /dev/null +++ b/openwrt/package/chillispot/ipkg/chillispot.init @@ -0,0 +1,20 @@ +#!/bin/sh + +RUN_D=/var/run +PID_F=$RUN_D/chilli.pid + +case $1 in + start) + /sbin/insmod tun >/dev/null 2>&1 + [ -d $RUN_D ] || mkdir -p $RUN_D + /usr/sbin/chilli + ;; + stop) + [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1 + ;; + *) + echo "usage: $0 (start|stop)" + exit 1 +esac + +exit $?