xinetd/xinetd-initscript

57 lines
1.3 KiB
Bash

#!/bin/bash
#
# xinetd This starts and stops xinetd.
#
# Begin $rc_base/init.d/xinetd
# Based on sysklogd script from LFS-3.1 and earlier.
#
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
# Modified by Silvan Calarco - silvan.calarco@qilinux.it
#
# chkconfig: 345 40 30
# description: xinetd is a powerful replacement for inetd. \
# xinetd has access control machanisms, extensive \
# logging capabilities, the ability to make services \
# available based on time, and can place \
# limits on the number of servers that can be started, \
# among other things.
#
# processname: /usr/sbin/xinetd
# config: /etc/xinetd.conf
# pidfile: /run/xinetd.pid
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
start)
echo -n "Starting xinetd: "
loadproc /usr/sbin/xinetd -pidfile /run/xinetd.pid
echo
;;
stop)
echo -n "Stopping xinetd: "
killproc /usr/sbin/xinetd
echo
;;
reload)
echo -n "Reloading xinetd: "
reloadproc xinetd
echo
;;
restart)
$0 stop
sleep 1
$0 start
;;
status)
statusproc /usr/sbin/xinetd
;;
*)
echo "Usage: $0 {start|stop|reload|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/xinetd