packages/xinetd: fix initscript (closes: #10342)
[openwrt/svn-archive/archive.git] / net / xinetd / files / xinetd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006-2011 OpenWrt.org
3 START=50
4
5 DEFAULT=/etc/default/xinetd
6 RUN_D=/var/run
7 PID_F=$RUN_D/xinetd.pid
8
9 start() {
10 [ -f $DEFAULT ] && . $DEFAULT
11 [ -d $RUN_D ] || mkdir -p $RUN_D
12 xinetd -pidfile $PID_F $OPTIONS
13 }
14
15 stop() {
16 [ -f $PID_F ] && kill $(cat $PID_F)
17 }
18