#!/bin/sh
#
# start ftp server
#
# runlevels: geexbox, debug

# get options
test -f /etc/network || exit 1
. /etc/network

if test "$FTP_SERVER" = "yes" -a -f /etc/bftpd.conf -a -f /etc/ftp; then
  echo "### Starting FTP server ###"
  . /etc/ftp
  echo "$USERNAME $PASSWORD root /" > /etc/bftpdpwd
  bftpd -d -c /etc/bftpd.conf &
fi

exit 0
