summaryrefslogtreecommitdiffstats
path: root/src.etc/init.d/telnetd
diff options
context:
space:
mode:
Diffstat (limited to 'src.etc/init.d/telnetd')
-rwxr-xr-xsrc.etc/init.d/telnetd26
1 files changed, 18 insertions, 8 deletions
diff --git a/src.etc/init.d/telnetd b/src.etc/init.d/telnetd
index be9043b..b38a663 100755
--- a/src.etc/init.d/telnetd
+++ b/src.etc/init.d/telnetd
@@ -1,19 +1,29 @@
#!/bin/sh
+start()
+{
+ printf 'Starting telnetd...'
+ start-stop-daemon -S -q -n telnetd -x telnetd
+ printf 'done.\n'
+}
+
+stop()
+{
+ printf 'Stopping telnetd... '
+ start-stop-daemon -K -q -n telnetd
+ printf 'done.\n'
+}
+
case "${1}" in
start)
- printf 'Starting telnetd...'
- start-stop-daemon -S -q -n telnetd -x telnetd
- printf 'done.'
+ start
;;
stop)
- printf 'Stopping telnetd... '
- start-stop-daemon -K -q -n telnetd
- printf 'done.'
+ stop
;;
restart)
- "${0}" stop
- "${0}" start
+ stop
+ start
;;
*)
printf 'Usage: %s {start|stop|restart}\n' "${0}"