#!/bin/bash function install_rtorrent { # Install rTorrent aptitude update && aptitude -y install rtorrent } # end function install_rtorrent function configure_user { # Simple check to see if rtorrent is installed if [ ! -d "/usr/share/doc/rtorrent" ]; then echo -e "\033[31;1mERROR: Please ensure that rTorrent is installed on this system. \033[0m" exit 1 fi # Create a "watch" directory to allow automatic torrent downloads # Also create sessions directory to store torrent session info mkdir /home/$torrent_user/{watch,rtorrent_session} # Optimise the config file cat > /home/$torrent_user/.rtorrent.rc <