Files
initscripts/usr/lib/init/services/telnetd.service
T
2024-11-01 15:33:36 +07:00

33 lines
608 B
Desktop File
Executable File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting telnetd"
/usr/bin/telnetd -p 23
check $? "start telnetd"
echo $(pgrep telnetd) > /var/run/telnetd.pid
return $?
}
stop() {
notify "Stopping telnetd"
kill $(cat /var/run/telnetd.pid | awk '{ print $2 }')
check $? "stop telnetd"
rm /var/run/telnetd.pid &> /dev/null
return $?
}
case "$1" in
start|stop|restart|reload|help)
"$1"
;;
*)
help
;;
esac
return $?