#!/bin/sh
Green='\033[0;32m'
Color_off='\033[0m'
Red='\033[0;31m'

. /etc/init.d/init-functions

case "$1" in
        start)
                notify "Starting telnet "
                telnetd -S -p $(cat /etc/openrouter/telnet/port)
		check $?
                ;;
        stop)
                notify "Stopping telnet "
                killall telnetd
                check $?
                ;;
        restart|reload)
                "$0" stop
                "$0" start
                ;;
        *)
                echo "telnet init script usage: $0 {start|stop|restart}"
                return 1
esac
return $?
