port lots of init scripts over to rc.common (more to come)
[packages.git] / net / xinetd / files / xinetd.init
1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2006 OpenWrt.org
3
4 DEFAULT=/etc/default/xinetd
5 RUN_D=/var/run
6 PID_F=$RUN_D/xinetd.pid
7 [ -f $DEFAULT ] && . $DEFAULT
8
9 start() {
10         [ -d $RUN_D ] || mkdir -p $RUN_D
11         xinetd $OPTIONS
12 }
13
14 stop() {
15         [ -f $PID_F ] && kill $(cat $PID_F)
16 }
17