2015-07-13 11:05:36 +02:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# Start telnet....
|
|
|
|
#
|
|
|
|
|
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting telnetd: "
|
2015-07-13 11:05:36 +02:00
|
|
|
start-stop-daemon -S -q -m -b -p /var/run/telnetd.pid \
|
|
|
|
-x /usr/sbin/telnetd -- -F
|
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping telnetd: "
|
2015-07-13 11:05:36 +02:00
|
|
|
start-stop-daemon -K -q -p /var/run/telnetd.pid \
|
|
|
|
-x /usr/sbin/telnetd
|
|
|
|
[ $? = 0 ] && echo "OK" || echo "FAIL"
|
|
|
|
}
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
start)
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
stop)
|
|
|
|
stop
|
|
|
|
;;
|
|
|
|
restart|reload)
|
|
|
|
stop
|
|
|
|
start
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
|
|
exit 1
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit $?
|