blob: f8fbf94aeaa6dbf848cb361e21382b507dfff7c7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/bin/sh
#RCUPDATE:3 4:72:This line is required for script management
. /etc/rc.d/config/functions
SERVICE=xinetd
EXE="/usr/sbin/xinetd"
opts="start stop"
prepconfig() {
if [ ! -e /etc/xinetd.conf ] ; then
einfo "Creating new config from inetd..."
/usr/sbin/xconv.pl < /etc/inetd.conf > /etc/xinetd.conf
fi
if [ /etc/inetd.conf -nt /etc/xinetd.conf ] ; then
einfo "Creating new config from inetd..."
/usr/sbin/xconv.pl < /etc/inetd.conf > /etc/xinetd.conf
fi
if [ ! -e /etc/xinetd.conf ]
then
eerror "Xinetd not started. Config file not found."
exit 1
fi
}
start() {
prepconfig
ebegin "Starting ${SERVICE}"
start-stop-daemon --start --quiet --exec $EXE 1>&2
eend $?
}
stop() {
ebegin "Stopping ${SERVICE}"
start-stop-daemon --stop --quiet -u root -n $SERVICE 1>&2
eend $?
}
doservice ${@}
|