update scripts

This commit is contained in:
wt committed 2024-11-01 14:15:42 +07:00
1 parent 95e2551110
commit 4a8ea1b190
17 files changed
+381 -126

No files matched your search

+18 -14
View File
@@ -5,21 +5,25 @@
. /usr/lib/init/init-funcs.sh
#------------------------------------
start() {
notify "Starting telnetd"
/usr/bin/telnetd -p 23
check $? "start telnetd"
echo $(gprep telnetd) > /var/run/telnetd.pid
return $?
}
stop() {
notify "Stopping telnetd"
kill $(cat /var/run/telnetd.pid)
check $? "stop telnetd"
rm /var/run/telnetd.pid &> /dev/null
return $?
}
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
start|stop|restart|reload|help)
"$1"
;;
*)
help