8ca59b93f85128b517733d1135b4f4183d3e6b07
[openwrt/svn-archive/archive.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
8 start() {
9 [ -f $DEFAULT ] && . $DEFAULT
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