apt-get autoremove --purge mysql* -y
echo "deb http://ppa.launchpad.net/deluge-team/ppa/ubuntu jaunty main" >> /etc/apt/sources.list
echo "deb-src http://ppa.launchpad.net/deluge-team/ppa/ubuntu jaunty main" >> /etc/apt/sources.list
apt-get install python-software-properties --force-yes -y
add-apt-repository ppa:deluge-team/ppa
apt-get update -y
apt-get install proftpd screen deluged deluge-web -y
sed -i s/"#DefaultRoot"/"DefaultRoot"/g /etc/proftpd/proftpd.conf
/etc/init.d/proftpd restart
clear
read -p "Please enter your FTP Username: " ftpusername
read -p "Please enter your FTP Password: " ftppassword
sudo useradd $ftpusername
touch /root/chpass.txt
echo $ftpusername:$ftppassword >> /root/chpass.txt
chpasswd < /root/chpass.txt
rm -rf /root/chpass.txt
mkdir -p /home/$ftpusername
chmod -R 777 /home/$ftpusername/*
wget -O /etc/init.d/deluge-daemon http://www.2dan.cc/download/deluge-daemon
wget -O /etc/default/deluge-daemon http://www.2dan.cc/download/deluge-daemon2
sudo chmod 755 /etc/init.d/deluge-daemon
sudo update-rc.d deluge-daemon defaults
sudo /etc/init.d/deluge-daemon start