#!/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 $?