blob: 453ad54eaac090fcdff6a56a4fbdd0af30ed88b6 (
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
|
#!/bin/sh
#RCUPDATE:3 4:72:This line is required for script management
. /etc/rc.d/config/functions
SERVICE=xinetd
opts="start stop"
autoconfig() {
if [ ! -e /etc/xinetd.conf ] ; then
if [ ! -e /etc/inetd.conf ] ; then
eerror "You need an /etc/xinetd.conf file to run xinetd"
eerror "There is a sample one in /usr/share/docs/xinetd"
return 1
else
einfo "Auto-creating xinetd.conf from your inetd.conf"
/usr/sbin/xconv.pl < /etc/inetd.conf > /etc/xinetd.conf
fi
fi
}
start() {
autoconfig
ebegin "Starting supervised ${SERVICE}"
ln -sf ../services/${SERVICE} ${SVCDIR}/control/${SERVICE}
eend $?
}
stop() {
ebegin "Stopping supervised ${SERVICE}"
if [ -e ${SVCDIR}/control/${SERVICE} ]
then
/usr/bin/svc -dx ${SVCDIR}/control/${SERVICE}
rm ${SVCDIR}/control/${SERVICE}
fi
eend $?
}
doservice ${@}
|