3
# start/stop inetd super server.
5
if ! [ -x /usr/sbin/inetd -o -e /etc/inetd.conf ]; then
10
if grep -v "^ *#" /etc/inetd.conf | grep 'rpc/' >/dev/null; then
11
if ! [ -x /usr/bin/rpcinfo ]; then
13
echo "WARNING: rpcinfo not available - RPC services may be unavailable!"
14
echo " (Commenting out the rpc services in inetd.conf will"
15
echo " disable this message)"
17
elif ! /usr/bin/rpcinfo -u localhost portmapper >/dev/null 2>&1; then
19
echo "WARNING: portmapper inactive - RPC services unavailable!"
20
echo " (Commenting out the rpc services in inetd.conf will"
21
echo " disable this message)"
28
if ! grep -q "^[0-9A-Za-z/]" /etc/inetd.conf; then
29
echo " no services configured, inetd not started."
37
echo -n "Starting internet superserver:"
40
start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
44
echo -n "Stopping internet superserver:"
46
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
50
echo -n "Reloading internet superserver:"
52
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid --signal 1
59
echo -n "Restarting internet superserver:"
60
start-stop-daemon --stop --quiet --oknodo --pidfile /var/run/inetd.pid
64
start-stop-daemon --start --quiet --pidfile /var/run/inetd.pid --exec /usr/sbin/inetd
68
echo "Usage: /etc/init.d/inetd {start|stop|reload|restart}"