#!/bin/sh
#
# Start the inetd super-server
#

INETCONF=/etc/inetd.conf
INETSH=/etc/init.d/inetd

FTPCONF=/mnt/conf/ftp.conf

test -f $FTPCONF || exit 1

FTP_ENABLE=`cat $FTPCONF | awk '/enableUnsecureFTP/ { print $2}' `;
if [ ! $FTP_ENABLE -eq 1 ]; then 
    exit 1
fi

FTP_OPT="ftp	stream	tcp	nowait	root	/home/ucftpd ucftpd -i"

echo $FTP_OPT > $INETCONF

if [ -e $INETSH ]; then
    $INETSH $1
fi
