#!/bin/sh /etc/rc.common
# Copyright (C) 2006-2010 OpenWrt.org
# Copyright (C) 2006 Carlos Sobrinho

START=50
STOP=15

start() {
	# commands to launch application
	if [ ! -f /tmp/access_control_disable_telnet ]; then
		PORT=`uci get utelnetd.@utelnetd[0].Port`
		utelnetd -l /usr/bin/draysh -d -p $PORT
	fi
}
 
stop() {
	# commands to kill application
	killall utelnetd 2>/dev/null 
}

restart(){
    stop
    start
}

