[packages] pepperspot: Update to v0.2, add missing dependency on kmod-ipv6 (#5705)
[openwrt/svn-archive/archive.git] / net / pepperspot / files / pepperspot.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 OpenWrt.org
3 START=50
4
5 RUN_D=/var/run
6 PID_F=$RUN_D/pepper.pid
7
8 start() {
9 include /lib/network
10 scan_interfaces
11 /sbin/insmod tun >/dev/null 2>&1
12 /sbin/insmod ipv6 >/dev/null 2>&1
13 [ -d $RUN_D ] || mkdir -p $RUN_D
14 config_get ipaddr lan ipaddr
15 /usr/sbin/pepper --dns1="$ipaddr"
16 }
17
18 stop() {
19 [ -f $PID_F ] && kill $(cat $PID_F) >/dev/null 2>&1
20 }