3 # xinetd This starts and stops xinetd.
6 # description: xinetd is a powerful replacement for inetd. \
7 # xinetd has access control machanisms, extensive \
8 # logging capabilities, the ability to make services \
9 # available based on time, and can place \
10 # limits on the number of servers that can be started, \
13 # processname: /usr/sbin/xinetd
14 # config: /etc/sysconfig/network
15 # config: /etc/xinetd.conf
16 # pidfile: /var/run/xinetd.pid
18 PATH=/sbin:/bin:/usr/bin:/usr/sbin
20 # Source function library.
21 . /etc/init.d/functions
24 test -f /etc/sysconfig/network && . /etc/sysconfig/network
28 test -f /etc/sysconfig/xinetd && . /etc/sysconfig/xinetd
30 # Check that networking is up.
31 [ ${NETWORKING} = "yes" ] || exit 0
33 [ -f /usr/sbin/xinetd ] || exit 1
34 [ -f /etc/xinetd.conf ] || exit 1
38 if [ "$NETWORKING_IPV6" = "yes" ] && [ -x /usr/sbin/xinetd6 ]; then
45 echo -n $"Starting $prog: "
46 # Need to get rid of localization for external services -
47 # it doesn't make much sense to have i18n on the server side here
56 export LANG LC_TIME LC_ALL LC_MESSAGES LC_NUMERIC LC_MONETARY LC_COLLATE
57 unset HOME MAIL USER USERNAME
58 daemon $prog -stayalive -reuse -pidfile /var/run/xinetd.pid "$EXTRAOPTIONS"
61 touch /var/lock/subsys/xinetd
66 echo -n $"Stopping $prog: "
70 rm -f /var/lock/subsys/xinetd
76 echo -n $"Reloading configuration: "
89 [ -e /var/lock/subsys/xinetd ] && restart
94 echo -n $"Dumping configuration: "
102 echo -n $"Performing Consistency Check: "
103 /bin/kill -s IOT $prog
109 # See how we were called.
136 echo $"Usage: $0 {start|stop|status|restart|condrestart|reload|dump|check}"