Files
initscripts/usr/lib/init/services/telnetd.service
T
2024-11-01 12:46:26 +07:00

29 lines
646 B
Desktop File
Executable File

#!/bin/sh
#--- import colors and init-funcs ---
. /usr/lib/init/colors.sh
. /usr/lib/init/init-funcs.sh
#------------------------------------
case "$1" in
start)
printf "$BBLUE**$BYELLOW Starting telnetd\n$RESET"
/usr/bin/telnetd -p 23
check $? "start telnetd"
echo $(gprep telnetd) > /var/run/telnetd.pid
;;
stop)
printf "$BBLUE**$BYELLOW Stopping telnetd\n$RESET"
kill $(cat /var/run/telnetd.pid)
check $? "stop telnetd"
rm /var/run/telnetd.pid &> /dev/null
;;
restart|reload)
restart
;;
*)
help
;;
esac
return $?