summaryrefslogtreecommitdiffstats
path: root/generic/etc/init.d/inetd
diff options
context:
space:
mode:
Diffstat (limited to 'generic/etc/init.d/inetd')
-rwxr-xr-xgeneric/etc/init.d/inetd51
1 files changed, 51 insertions, 0 deletions
diff --git a/generic/etc/init.d/inetd b/generic/etc/init.d/inetd
new file mode 100755
index 000000000..9c746713d
--- /dev/null
+++ b/generic/etc/init.d/inetd
@@ -0,0 +1,51 @@
+#!/bin/sh
+#
+# This is an inetd init.d script which ist called by init(1) with [start|stop] as argument
+#
+
+PATH=/sbin:/bin:/usr/bin
+BINARY=/usr/sbin/inetd
+
+# --- nothing to change after this line ---
+
+test -f $BINARY || { echo "$BINARY not found" >&2 ; exit 0; }
+
+start_proc() {
+ echo -n "Starting INETD server: inetd ..."
+ $BINARY
+ echo "DONE"
+}
+
+stop_proc() {
+ echo -n "Stopping INETD server: inetd ..."
+ killall inetd
+ echo "DONE"
+}
+
+
+case "$1" in
+ start)
+ start_proc
+ ;;
+ stop)
+ stop_proc
+ ;;
+ restart|force-reload)
+ echo -n "Restarting INETD server: inetd... "
+ stop_proc
+ sleep 2
+ start_proc
+ echo "done."
+ ;;
+ reload)
+ echo "Not supported" >&2
+ exit 1
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload}"
+ exit 1
+ ;;
+esac
+
+exit 0
+