summaryrefslogtreecommitdiffstats
path: root/net/chillispot/files/chillispot.init
blob: 3fbba8d7fec43272532be114e725bf571fa4aac6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2012 OpenWrt.org

START=50

SERVICE_USE_PID=1
SERVICE_PID_FILE=/var/run/chilli.pid

start() {
	. /lib/functions/network.sh

	local ipaddr
	network_get_ipaddr ipaddr lan && \
		service_start /usr/sbin/chilli --dns1="$ipaddr"
}

stop() {
	service_stop /usr/sbin/chilli
}