#!/bin/bash

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 vsftpd screen deluged deluge-web -y
deluged
screen -fa -d -m -S deluge-web deluge-web
sed -i '/exit 0/d' /etc/rc.local
sed -i '/deluge/d' /etc/rc.local
echo "deluged" >> /etc/rc.local
echo "screen -fa -d -m -S deluge-web deluge-web" >> /etc/rc.local
echo "exit 0" >> /etc/rc.local

