[packages] chillispot: use service wrappers, use network.sh to find ip address
[openwrt/svn-archive/archive.git] / net / chillispot / files / chillispot.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2012 OpenWrt.org
3
4 START=50
5
6 SERVICE_USE_PID=1
7 SERVICE_PID_FILE=/var/run/chilli.pid
8
9 start() {
10 . /lib/functions/network.sh
11
12 local ipaddr
13 network_get_ipaddr ipaddr lan && \
14 service_start /usr/sbin/chilli --dns1="$ipaddr"
15 }
16
17 stop() {
18 service_stop /usr/sbin/chilli
19 }