Files
webgui/etc/rc.d/rc.inetd
T
2023-10-04 19:31:51 +02:00

55 lines
811 B
Bash
Executable File

#!/bin/bash
#
# script: rc.inetd
# Start/stop/restart inetd, the BSD Internet super-daemon.
# LimeTech - modified for Unraid OS
# Bergware - modified for Unraid OS, October 2023
DAEMON="Internet daemon"
# run & log functions
. /etc/rc.d/rc.runlog
inetd_start() {
log "Starting $DAEMON..."
local REPLY
if [[ -x /usr/sbin/inetd ]]; then
run /usr/sbin/inetd
REPLY="Started"
else
REPLY="Failed"
fi
log "$DAEMON... $REPLY."
}
inetd_stop() {
log "Stopping $DAEMON..."
killall inetd 2>/dev/null
log "$DAEMON... Stopped."
}
inetd_restart() {
log "Restarting $DAEMON..."
inetd_stop
sleep 1
inetd_start
}
case "$1" in
'start')
inetd_start
;;
'stop')
inetd_stop
;;
'restart')
inetd_restart
;;
*)
echo "Usage: $BASENAME start|stop|restart"
exit 1
esac
exit 0