summaryrefslogtreecommitdiff
path: root/package/chillispot/ipkg/chillispot.init
diff options
context:
space:
mode:
authornico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-18 21:42:27 +0000
committernico <nico@3c298f89-4303-0410-b956-a3cf2f4a3e73>2005-04-18 21:42:27 +0000
commit82064231186eec72b7ad08a70104f292da078409 (patch)
tree8a750dfc30d2d6262a1e846461c70679d76e1e8d /package/chillispot/ipkg/chillispot.init
parent7917b74060e056daf3f2886e4d746ae94b99d73a (diff)
Update chillispot to 1.0RC3, uniformize package Makefile, move ipkg related files to ./ipkg, add conffiles
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@679 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/chillispot/ipkg/chillispot.init')
-rw-r--r--package/chillispot/ipkg/chillispot.init20
1 files changed, 20 insertions, 0 deletions
diff --git a/package/chillispot/ipkg/chillispot.init b/package/chillispot/ipkg/chillispot.init
new file mode 100644
index 0000000000..289b1fe8a5
--- /dev/null
+++ b/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 $?