mirror of
https://github.com/elisspace/rtinst.git
synced 2026-10-07 17:38:33 +00:00
Compare commits
55
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
16ddfa0325 | ||
|
|
14c270f096 | ||
|
|
5452c98799 | ||
|
|
016299230e | ||
|
|
763d2efdeb | ||
|
|
1f1ec0ad3a | ||
|
|
b18b5718fe | ||
|
|
deff019f56 | ||
|
|
11a019cd16 | ||
|
|
0a8b21b8f3 | ||
|
|
c3cde97a74 | ||
|
|
18dd935f18 | ||
|
|
6935c58e6a | ||
|
|
f9063b89d4 | ||
|
|
d2869bf416 | ||
|
|
e6523c1956 | ||
|
|
3df3171d5c | ||
|
|
227eb998f2 | ||
|
|
3613eae1d9 | ||
|
|
6c5191a144 | ||
|
|
eef6d04d9d | ||
|
|
bde4bb2492 | ||
|
|
e7679d897b | ||
|
|
ba2a315b37 | ||
|
|
a0be8c3278 | ||
|
|
16d2f1d310 | ||
|
|
11ff99f684 | ||
|
|
6def26dc46 | ||
|
|
ff43cb7ccf | ||
|
|
1d8116d622 | ||
|
|
c38c565211 | ||
|
|
15dd6d5b19 | ||
|
|
e4bfaf4322 | ||
|
|
30ac8a1efb | ||
|
|
658e2d3937 | ||
|
|
f885123bab | ||
|
|
24b3ca1d44 | ||
|
|
c094ea145e | ||
|
|
0da4c80b62 | ||
|
|
2068d3a45c | ||
|
|
f8eea44834 | ||
|
|
2cb8ba306d | ||
|
|
c96e68e2b5 | ||
|
|
e32810d684 | ||
|
|
72291ecd6f | ||
|
|
b802e761ae | ||
|
|
64e998b2de | ||
|
|
bfee5f27fe | ||
|
|
2f7ad34e5b | ||
|
|
0652fe19eb | ||
|
|
90072e5226 | ||
|
|
ab34ec9fd4 | ||
|
|
4ca8cbc9a4 | ||
|
|
2dd915d800 | ||
|
|
2ecf699e9d |
@@ -23,18 +23,13 @@ It takes about 10 minutes to run, depending on your server setup. After you have
|
|||||||
**IMPORTANT: NOTE THE NEW SSH PORT AND MAKE SURE YOU CAN SSH INTO YOUR SERVER BEFORE CLOSING THE EXISTING SESSION**
|
**IMPORTANT: NOTE THE NEW SSH PORT AND MAKE SURE YOU CAN SSH INTO YOUR SERVER BEFORE CLOSING THE EXISTING SESSION**
|
||||||
|
|
||||||
|
|
||||||
It has been tested with clean installs of:
|
Current release has been tested with clean installs of:
|
||||||
|
|
||||||
Ubuntu 12 (unsupported)
|
|
||||||
Ubuntu 13 (unsupported)
|
|
||||||
Ubuntu 14 (unsupported)
|
|
||||||
Ubuntu 15 (unsupported)
|
|
||||||
Ubuntu 16
|
Ubuntu 16
|
||||||
Ubuntu 17
|
Ubuntu 17
|
||||||
Ubuntu 18
|
Ubuntu 18
|
||||||
Ubuntu 19
|
Ubuntu 19
|
||||||
Debian 7 "Wheezy" (unsupported)
|
Ubuntu 20
|
||||||
Debian 8 "Jessie" (unsupported)
|
|
||||||
Debian 9 "Stretch"
|
Debian 9 "Stretch"
|
||||||
Debian 10 "Buster"
|
Debian 10 "Buster"
|
||||||
|
|
||||||
@@ -52,7 +47,14 @@ Services that will be installed and configured are
|
|||||||
|
|
||||||
[Additional information on all the features](https://github.com/arakasi72/rtinst/wiki/Guide)
|
[Additional information on all the features](https://github.com/arakasi72/rtinst/wiki/Guide)
|
||||||
|
|
||||||
For older unssuported OS listed above see the [Older OS Installation Guide](https://github.com/arakasi72/rtinst/wiki/Installing-on-Older-OS)
|
For older unssuported OS [Older OS Installation Guide](https://github.com/arakasi72/rtinst/wiki/Installing-on-Older-OS). These include:
|
||||||
|
|
||||||
|
Ubuntu 12 (old release)
|
||||||
|
Ubuntu 13 (old release)
|
||||||
|
Ubuntu 14 (old release)
|
||||||
|
Ubuntu 15 (old release)
|
||||||
|
Debian 7 "Wheezy" (old release)
|
||||||
|
Debian 8 "Jessie" (old release)
|
||||||
|
|
||||||
To see latest updates to the script go to [Change Log](https://github.com/arakasi72/rtinst/wiki/Change-Log)
|
To see latest updates to the script go to [Change Log](https://github.com/arakasi72/rtinst/wiki/Change-Log)
|
||||||
|
|
||||||
|
|||||||
+1
-5
@@ -14,7 +14,7 @@ server {
|
|||||||
deny all;
|
deny all;
|
||||||
|
|
||||||
location @denied {
|
location @denied {
|
||||||
return 301 https://$server_name$request_uri;
|
return 301 https://$host$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
@@ -46,10 +46,6 @@ server {
|
|||||||
|
|
||||||
client_max_body_size 40m;
|
client_max_body_size 40m;
|
||||||
|
|
||||||
if ($host != $server_name) {
|
|
||||||
return 301 https://$server_name$request_uri;
|
|
||||||
}
|
|
||||||
|
|
||||||
ssl_certificate /etc/ssl/ruweb.crt;
|
ssl_certificate /etc/ssl/ruweb.crt;
|
||||||
ssl_certificate_key /etc/ssl/private/ruweb.key;
|
ssl_certificate_key /etc/ssl/private/ruweb.key;
|
||||||
ssl_session_timeout 5m;
|
ssl_session_timeout 5m;
|
||||||
|
|||||||
@@ -35,12 +35,7 @@ fi
|
|||||||
if [[ $(systemctl list-units --all apt-daily.service | fgrep -c apt-daily.service) -gt 0 ]]; then
|
if [[ $(systemctl list-units --all apt-daily.service | fgrep -c apt-daily.service) -gt 0 ]]; then
|
||||||
systemctl stop apt-daily.service > /dev/null 2>&1
|
systemctl stop apt-daily.service > /dev/null 2>&1
|
||||||
systemctl kill --kill-who=all apt-daily.service > /dev/null 2>&1
|
systemctl kill --kill-who=all apt-daily.service > /dev/null 2>&1
|
||||||
|
sleep 5
|
||||||
# wait until `apt-get updated` has been killed
|
|
||||||
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead)
|
|
||||||
do
|
|
||||||
sleep 1;
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get -qq update
|
apt-get -qq update
|
||||||
@@ -62,7 +57,7 @@ if [ -d /etc/rtinst ] && [ -z $branch ]; then
|
|||||||
if [ -z $branch ]; then
|
if [ -z $branch ]; then
|
||||||
branch=$(git describe --tags --exact-match)
|
branch=$(git describe --tags --exact-match)
|
||||||
if [ ${branch:0:1} = v ]; then
|
if [ ${branch:0:1} = v ]; then
|
||||||
latest=$(basename "$(git ls-remote --tags https://github.com/arakasi72/rtinst.git | grep -o 'refs/tags/v.*' | sort -V | tail -1)")
|
latest=$(curl -s "https://api.github.com/repos/arakasi72/rtinst/releases/latest" | awk -F '"' '/tag_name/{print $4}')
|
||||||
if [ $branch != $latest ]; then
|
if [ $branch != $latest ]; then
|
||||||
echo "Updating from $branch to $latest"
|
echo "Updating from $branch to $latest"
|
||||||
branch=$latest
|
branch=$latest
|
||||||
|
|||||||
+1
-1
@@ -353,7 +353,7 @@ echo "?>" >> /var/www/rutorrent/conf/users/$user/config.php
|
|||||||
mkdir /var/www/rutorrent/conf/users/$user/plugins/autodl-irssi
|
mkdir /var/www/rutorrent/conf/users/$user/plugins/autodl-irssi
|
||||||
mkdir -p $home/.irssi/scripts/autorun
|
mkdir -p $home/.irssi/scripts/autorun
|
||||||
cd $home/.irssi/scripts
|
cd $home/.irssi/scripts
|
||||||
curl -sL http://git.io/vlcND | grep -Po '(?<="browser_download_url": ")(.*-v[\d.]+.zip)' | xargs wget --quiet -O autodl-irssi.zip
|
curl -sL http://git.io/vlcND | sed -n 's/.*browser_download_url": \?"\(.*zip\)".*/\1/p' | xargs wget --quiet -O autodl-irssi.zip
|
||||||
unzip -o autodl-irssi.zip >> /dev/null 2>&1
|
unzip -o autodl-irssi.zip >> /dev/null 2>&1
|
||||||
rm autodl-irssi.zip
|
rm autodl-irssi.zip
|
||||||
cp autodl-irssi.pl autorun/
|
cp autodl-irssi.pl autorun/
|
||||||
|
|||||||
+164
-128
@@ -8,99 +8,6 @@
|
|||||||
#
|
#
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
||||||
###############################
|
|
||||||
### SET VARIABLES ###
|
|
||||||
###############################
|
|
||||||
|
|
||||||
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
|
||||||
|
|
||||||
# if left blank will install latest version of rtorrent, or set to a specific release E.G. '0.9.6' to install that release
|
|
||||||
rtorrentrel='0.9.6'
|
|
||||||
|
|
||||||
#url's of the major components
|
|
||||||
rt_url="http://rtorrent.net/downloads/"
|
|
||||||
|
|
||||||
xmlrpc_url="https://svn.code.sf.net/p/xmlrpc-c/code/advanced/"
|
|
||||||
xmlrpc_url_alt="https://github.com/mirror/xmlrpc-c"
|
|
||||||
|
|
||||||
ru_url="https://github.com/Novik/ruTorrent/"
|
|
||||||
adl_url="https://github.com/autodl-community/"
|
|
||||||
|
|
||||||
if [ $(dpkg-query -W -f='${Status}' lsb-release 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
|
||||||
echo "Installing lsb-release"
|
|
||||||
apt-get -yqq install lsb-release 2>&1 >> /dev/null
|
|
||||||
fi
|
|
||||||
|
|
||||||
fullrel=$(lsb_release -sd)
|
|
||||||
osname=$(lsb_release -si)
|
|
||||||
relno=$(lsb_release -sr | cut -d. -f1)
|
|
||||||
|
|
||||||
if [ "$relno" = "16" ] || [ "$relno" = "17" ] || [ "$relno" = "9" ]; then
|
|
||||||
phpver=php7.0
|
|
||||||
phploc=/etc/php/7.0
|
|
||||||
libcver=libcurl3
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ $(lsb_release -sr) = "17.10" ]; then
|
|
||||||
phpver=php7.1
|
|
||||||
phploc=/etc/php/7.1
|
|
||||||
libcver=libcurl3
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$relno" = "18" ] || [ "$relno" = "19" ]; then
|
|
||||||
phpver=php7.2
|
|
||||||
phploc=/etc/php/7.2
|
|
||||||
libcver=libcurl4
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$relno" = "10" ]; then
|
|
||||||
phpver=php7.3
|
|
||||||
phploc=/etc/php/7.3
|
|
||||||
libcver=libcurl4
|
|
||||||
fi
|
|
||||||
|
|
||||||
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
|
||||||
serveripb=$(wget -qO- ipecho.net/plain)
|
|
||||||
|
|
||||||
if [ "$serveripa" = "$serveripb" ]; then
|
|
||||||
serverip=$serveripa
|
|
||||||
else
|
|
||||||
echo "Select the IP address to use:"
|
|
||||||
echo "1.) "$serveripa
|
|
||||||
echo "2.) "$serveripb
|
|
||||||
|
|
||||||
while true
|
|
||||||
do
|
|
||||||
read answer
|
|
||||||
case $answer in [1] ) serverip=$serveripa && break ;;
|
|
||||||
[2] ) serverip=$serveripb && break ;;
|
|
||||||
* ) echo "Enter 1 or 2";;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "IP set to "$serverip
|
|
||||||
|
|
||||||
|
|
||||||
export logfile="/dev/null"
|
|
||||||
webpass=''
|
|
||||||
cronline1="@reboot sleep 10; /usr/local/bin/rtcheck irssi rtorrent"
|
|
||||||
cronline2="*/10 * * * * /usr/local/bin/rtcheck irssi rtorrent"
|
|
||||||
dlflag=1
|
|
||||||
portdefault=1
|
|
||||||
|
|
||||||
skip_rt=1
|
|
||||||
sshport=''
|
|
||||||
rudevflag=1
|
|
||||||
rurelease=master
|
|
||||||
passfile='/etc/nginx/.htpasswd'
|
|
||||||
package_list="sudo nano autoconf build-essential ca-certificates comerr-dev curl dtach htop irssi libcppunit-dev $libcver libncurses5-dev libterm-readline-gnu-perl libsigc++-2.0-dev libperl-dev libtool libxml2-dev ncurses-base ncurses-term ntp patch pkg-config $phpver-fpm $phpver $phpver-cli $phpver-dev $phpver-curl php-geoip $phpver-xmlrpc $phpver-xml python-scgi screen subversion texinfo unzip zlib1g-dev libcurl4-openssl-dev mediainfo software-properties-common aptitude $phpver-json nginx-full apache2-utils git libarchive-zip-perl libnet-ssleay-perl libhtml-parser-perl libxml-libxml-perl libjson-perl libjson-xs-perl libxml-libxslt-perl libjson-rpc-perl libarchive-zip-perl"
|
|
||||||
Install_list=""
|
|
||||||
unixpass=""
|
|
||||||
passflag=0
|
|
||||||
forceyes=1
|
|
||||||
selfsign=1
|
|
||||||
rut_add_users=1
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
### FUNCTIONS ###
|
### FUNCTIONS ###
|
||||||
@@ -108,7 +15,7 @@ rut_add_users=1
|
|||||||
|
|
||||||
#function to check if a web site is reachable
|
#function to check if a web site is reachable
|
||||||
check_url() {
|
check_url() {
|
||||||
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then return 0; else return 1; fi
|
if [[ `wget -S -T 3 --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then return 0; else return 1; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# checks if an application is installed
|
# checks if an application is installed
|
||||||
@@ -154,11 +61,12 @@ tr -dc A-Za-z0-9 < /dev/urandom | head -c ${genln} | xargs
|
|||||||
|
|
||||||
#function executed if the script finishes early
|
#function executed if the script finishes early
|
||||||
early_exit() {
|
early_exit() {
|
||||||
|
local rt_ee_version
|
||||||
echo "Installation is incomplete. Run rtinst again to complete"
|
echo "Installation is incomplete. Run rtinst again to complete"
|
||||||
echo
|
echo
|
||||||
if hash rtorrent >> /dev/null 2>&1; then
|
if hash rtorrent >> /dev/null 2>&1; then
|
||||||
rt_current=$(rtorrent -h | grep -om 1 "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}")
|
rt_ee_version=$(rtorrent -h | grep -om 1 "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}")
|
||||||
echo "rtorrent $rt_current installed"
|
echo "rtorrent $rt_ee_version installed"
|
||||||
else
|
else
|
||||||
echo "rtorrent was not installed"
|
echo "rtorrent was not installed"
|
||||||
fi
|
fi
|
||||||
@@ -242,22 +150,147 @@ while true
|
|||||||
|
|
||||||
# function to enter IP address
|
# function to enter IP address
|
||||||
enter_ip() {
|
enter_ip() {
|
||||||
|
local ip_address=$1
|
||||||
|
|
||||||
|
exec 3>&1 >/dev/tty
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
if valid_ip $serverip ; then
|
if valid_ip $ip_address ; then
|
||||||
echo "Your Server IP is $serverip"
|
echo "Your Server IP is $ip_address"
|
||||||
echo -n "Is this correct y/n? "
|
echo -n "Is this correct y/n? "
|
||||||
ask_user && return 0
|
ask_user && break
|
||||||
else
|
else
|
||||||
echo "Invalid IP address, please try again"
|
echo "Invalid IP address, please try again"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "enter your server's IP address"
|
echo "enter your server's IP address"
|
||||||
echo "e.g. 213.0.113.113"
|
echo "e.g. 213.0.113.113"
|
||||||
read serverip
|
read ip_address
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exec >&3-
|
||||||
|
|
||||||
|
echo $ip_address
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
###############################
|
||||||
|
### SET VARIABLES ###
|
||||||
|
###############################
|
||||||
|
|
||||||
|
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
||||||
|
|
||||||
|
# if left blank will install latest version of rtorrent, or set to a specific release E.G. '0.9.6' to install that release
|
||||||
|
rtorrentrel='0.9.6'
|
||||||
|
|
||||||
|
#url's of the major components
|
||||||
|
rt_url="http://rtorrent.net/downloads/"
|
||||||
|
|
||||||
|
xmlrpc_url="https://svn.code.sf.net/p/xmlrpc-c/code/advanced/"
|
||||||
|
xmlrpc_url_alt="https://github.com/mirror/xmlrpc-c"
|
||||||
|
|
||||||
|
ru_url="https://github.com/Novik/ruTorrent/"
|
||||||
|
adl_url="https://github.com/autodl-community/"
|
||||||
|
|
||||||
|
if [ $(dpkg-query -W -f='${Status}' lsb-release 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
|
echo "Installing lsb-release"
|
||||||
|
apt-get -yqq install lsb-release 2>&1 >> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
fullrel=$(lsb_release -sd)
|
||||||
|
osname=$(lsb_release -si)
|
||||||
|
relno=$(lsb_release -sr | cut -d. -f1)
|
||||||
|
|
||||||
|
# Fallback if lsb_release -si returns anything else than Ubuntu, Debian or Raspbian
|
||||||
|
if [ ! "$osname" = "ubuntu" ] && [ ! "$osname" = "debian" ] && [ ! "$osname" = "raspbian" ] && [ ! "$osname" = "Linuxmint" ]; then
|
||||||
|
osname=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
|
||||||
|
osname=${osname^}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fallback if lsb_release -sr returns nothing
|
||||||
|
if [ "$relno" = "" ]; then
|
||||||
|
relno=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$relno" = "16" ] || [ "$relno" = "17" ] || [ "$relno" = "9" ]; then
|
||||||
|
phpver=php7.0
|
||||||
|
phploc=/etc/php/7.0
|
||||||
|
libcver=libcurl3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$(lsb_release -sr)" = "17.10" ]; then
|
||||||
|
phpver=php7.1
|
||||||
|
phploc=/etc/php/7.1
|
||||||
|
libcver=libcurl3
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$relno" = "18" ] || [ "$relno" = "19" ]; then
|
||||||
|
phpver=php7.2
|
||||||
|
phploc=/etc/php/7.2
|
||||||
|
libcver=libcurl4
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$relno" = "10" ] || [ "$(lsb_release -sr)" = "19.10" ]; then
|
||||||
|
phpver=php7.3
|
||||||
|
phploc=/etc/php/7.3
|
||||||
|
libcver=libcurl4
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$relno" = "20" ] || [ "$(lsb_release -sr)" = "20.04" ] || [ "$relno" = "11" ]; then
|
||||||
|
phpver=php7.4
|
||||||
|
phploc=/etc/php/7.4
|
||||||
|
libcver=libcurl4
|
||||||
|
fi
|
||||||
|
|
||||||
|
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
||||||
|
serveripb=$(wget -qO- --timeout=3 ipecho.net/plain)
|
||||||
|
serveripc=$(wget -qO- --timeout=3 ipinfo.io/ip)
|
||||||
|
|
||||||
|
if [ "$serveripa" = "$serveripb" ] || [ "$serveripa" = "$serveripc" ]; then
|
||||||
|
serverip=$serveripa
|
||||||
|
else
|
||||||
|
echo "Select the IP address to use:"
|
||||||
|
echo "1.) "$serveripa
|
||||||
|
echo "2.) "$serveripb
|
||||||
|
echo "3.) "$serveripc
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
read answer
|
||||||
|
case $answer in [1] ) serverip=$serveripa && break ;;
|
||||||
|
[2] ) serverip=$serveripb && break ;;
|
||||||
|
[3] ) serverip=$serveripc && break ;;
|
||||||
|
* ) echo "Enter 1, 2 or 3";;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "IP set to "$serverip
|
||||||
|
|
||||||
|
|
||||||
|
export logfile="/dev/null"
|
||||||
|
webpass=''
|
||||||
|
cronline1="@reboot sleep 10; /usr/local/bin/rtcheck irssi rtorrent"
|
||||||
|
cronline2="*/10 * * * * /usr/local/bin/rtcheck irssi rtorrent"
|
||||||
|
dlflag=1
|
||||||
|
portdefault=1
|
||||||
|
|
||||||
|
skip_rt=1
|
||||||
|
sshport=''
|
||||||
|
rudevflag=1
|
||||||
|
rurelease=master
|
||||||
|
passfile='/etc/nginx/.htpasswd'
|
||||||
|
package_list="sudo nano autoconf build-essential ca-certificates comerr-dev curl dtach htop irssi libcppunit-dev $libcver libncurses5-dev libterm-readline-gnu-perl libsigc++-2.0-dev libperl-dev libtool libxml2-dev ncurses-base ncurses-term ntp patch pkg-config $phpver-fpm $phpver $phpver-cli $phpver-dev $phpver-curl php-geoip $phpver-xmlrpc $phpver-xml $phpver-zip screen subversion texinfo unzip zlib1g-dev libcurl4-openssl-dev mediainfo software-properties-common $phpver-json nginx-full apache2-utils git libarchive-zip-perl libnet-ssleay-perl libhtml-parser-perl libxml-libxml-perl libjson-perl libjson-xs-perl libxml-libxslt-perl libjson-rpc-perl libarchive-zip-perl"
|
||||||
|
Install_list=""
|
||||||
|
unixpass=""
|
||||||
|
passflag=0
|
||||||
|
forceyes=1
|
||||||
|
selfsign=1
|
||||||
|
rut_add_users=1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
### INITIAL SYSTEM CHECKS ###
|
### INITIAL SYSTEM CHECKS ###
|
||||||
###############################
|
###############################
|
||||||
@@ -268,11 +301,11 @@ if [ "$(id -u)" != "0" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# determine system
|
# determine system
|
||||||
if ([ "$osname" = "Ubuntu" ] && [ $relno -ge 16 ]) || ([ "$osname" = "Debian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]); then
|
if ([ "$osname" = "Ubuntu" ] && [ $relno -ge 16 ]) || ([ "$osname" = "Debian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Linuxmint" ] && [ $relno -ge 16 ]); then
|
||||||
echo $fullrel
|
echo $fullrel
|
||||||
else
|
else
|
||||||
echo $fullrel
|
echo $fullrel
|
||||||
echo "Only Ubuntu release 16 and later, and Debian and Raspbian release 9 and later, are supported"
|
echo "Only Ubuntu and Linux Mint release 16 and later, and Debian and Raspbian release 9 and later, are supported"
|
||||||
echo "Your system does not appear to be supported"
|
echo "Your system does not appear to be supported"
|
||||||
echo "Check https://github.com/arakasi72/rtinst/wiki/Installing-on-Older-OS to see if it is supported by an earlier rtinst release"
|
echo "Check https://github.com/arakasi72/rtinst/wiki/Installing-on-Older-OS to see if it is supported by an earlier rtinst release"
|
||||||
exit
|
exit
|
||||||
@@ -347,7 +380,7 @@ fi
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# check IP Address
|
# check IP Address
|
||||||
[ $forceyes = 1 ] && enter_ip
|
[ $forceyes = 1 ] && serverip=$(enter_ip $serverip)
|
||||||
|
|
||||||
echo "Your server's IP is set to $serverip"
|
echo "Your server's IP is set to $serverip"
|
||||||
export serverip
|
export serverip
|
||||||
@@ -510,30 +543,28 @@ echo
|
|||||||
if [[ $(systemctl list-units --all apt-daily.service | fgrep -c apt-daily.service) -gt 0 ]]; then
|
if [[ $(systemctl list-units --all apt-daily.service | fgrep -c apt-daily.service) -gt 0 ]]; then
|
||||||
systemctl stop apt-daily.service >> $logfile 2>&1
|
systemctl stop apt-daily.service >> $logfile 2>&1
|
||||||
systemctl kill --kill-who=all apt-daily.service >> $logfile 2>&1
|
systemctl kill --kill-who=all apt-daily.service >> $logfile 2>&1
|
||||||
|
sleep 5
|
||||||
# wait until `apt-get updated` has been killed
|
|
||||||
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead)
|
|
||||||
do
|
|
||||||
sleep 1;
|
|
||||||
done
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#update amd upgrade system
|
#update amd upgrade system
|
||||||
echo "Updating package lists" | tee $logfile
|
echo "Updating package lists" | tee $logfile
|
||||||
apt-get -qq update | tee -a $logfile
|
apt-get -qq update | tee -a $logfile
|
||||||
|
|
||||||
|
# Installing Aptitude
|
||||||
|
apt-get -qqy install aptitude
|
||||||
|
|
||||||
echo "Upgrading packages" | tee -a $logfile
|
echo "Upgrading packages" | tee -a $logfile
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
apt-get -qq upgrade >> $logfile 2>&1
|
aptitude -q=5 -y upgrade >> $logfile 2>&1
|
||||||
if ! [ $? = 0 ]; then
|
if ! [ $? = 0 ]; then
|
||||||
echo "Problem upgrading packages. Run 'apt-get upgrade' successfully and rerun the script" && exit
|
echo "Problem upgrading packages. Run 'aptitude upgrade' successfully and rerun the script" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
apt-get clean && apt-get autoclean >> $logfile 2>&1
|
aptitude clean && aptitude autoclean >> $logfile 2>&1
|
||||||
|
|
||||||
#install the packsges needed
|
#install the packages needed
|
||||||
echo "Installing required packages" | tee -a $logfile
|
echo "Installing required packages" | tee -a $logfile
|
||||||
|
aptitude -q=5 -y install libtool >> $logfile 2>&1
|
||||||
for package_name in $package_list
|
for package_name in $package_list
|
||||||
do
|
do
|
||||||
if [ $(apt-cache show -q=0 $package_name 2>&1 | grep -c "No packages found") -eq 0 ]; then
|
if [ $(apt-cache show -q=0 $package_name 2>&1 | grep -c "No packages found") -eq 0 ]; then
|
||||||
@@ -545,13 +576,18 @@ for package_name in $package_list
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
test -z "$install_list" || apt-get -qq install $install_list >> $logfile 2>&1
|
# Installs a package needed to prevent arm64 architectures from "WARNING: Unable to start rtorrent"
|
||||||
|
if [ "$(uname --m)" == "aarch64" ] || [ "$(dpkg --print-architecture)" == "arm64" ] ; then
|
||||||
|
aptitude -q=5 -y install libxmlrpc-core-c3-dev >> $logfile 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
test -z "$install_list" || aptitude -q=5 -y install $install_list >> $logfile 2>&1
|
||||||
if ! [ $? = 0 ]; then
|
if ! [ $? = 0 ]; then
|
||||||
echo "Problem installing packages. Check log and rerun once it is resolved" && exit
|
echo "Problem installing packages. Check log and rerun once it is resolved" && exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $phpver =~ php7.[0-9] ]]; then
|
if [[ $phpver =~ php7.[0-9] ]]; then
|
||||||
apt-get -qq install $phpver-mbstring >> $logfile 2>&1
|
aptitude -q=5 -y install $phpver-mbstring >> $logfile 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#install unrar package
|
#install unrar package
|
||||||
@@ -563,13 +599,13 @@ if [ $osname = "Debian" ] && ! installed unrar; then
|
|||||||
do
|
do
|
||||||
attempts=$(( $attempts + 1 ))
|
attempts=$(( $attempts + 1 ))
|
||||||
if [ "$(uname -m)" = "x86_64" ]; then
|
if [ "$(uname -m)" = "x86_64" ]; then
|
||||||
wget http://www.rarlab.com/rar/rarlinux-x64-5.5.0.tar.gz >> $logfile 2>&1
|
wget http://www.rarlab.com/rar/rarlinux-x64-5.7.1.tar.gz >> $logfile 2>&1
|
||||||
tar xvzf rarlinux-x64-5.5.0.tar.gz >> $logfile 2>&1
|
tar xvzf rarlinux-x64-5.7.1.tar.gz >> $logfile 2>&1
|
||||||
rm rarlinux-x64-5.5.0.tar.gz
|
rm rarlinux-x64-5.7.1.tar.gz
|
||||||
elif [ "$(uname -m)" = "x86_32" ]; then
|
elif [ "$(uname -m)" = "x86_32" ]; then
|
||||||
wget http://www.rarlab.com/rar/rarlinux-5.5.0.tar.gz >> $logfile 2>&1
|
wget http://www.rarlab.com/rar/rarlinux-5.7.1.tar.gz >> $logfile 2>&1
|
||||||
tar xvzf rarlinux-5.5.0.tar.gz >> $logfile 2>&1
|
tar xvzf rarlinux-5.7.1.tar.gz >> $logfile 2>&1
|
||||||
rm rarlinux-5.5.0.tar.gz
|
rm rarlinux-5.7.1.tar.gz
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ -d rar ]; then
|
if [ -d rar ]; then
|
||||||
@@ -577,8 +613,8 @@ if [ $osname = "Debian" ] && ! installed unrar; then
|
|||||||
cp $home/rar/unrar /bin/unrar
|
cp $home/rar/unrar /bin/unrar
|
||||||
rm -r $home/rar
|
rm -r $home/rar
|
||||||
fi
|
fi
|
||||||
elif [ $osname = "Ubuntu" ]; then
|
elif [ $osname = "Ubuntu" || $osname = "Linuxmint" ]; then
|
||||||
apt-get -qq install unrar >> $logfile 2>&1
|
aptitude -q=5 -y install unrar >> $logfile 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if installed unrar; then
|
if installed unrar; then
|
||||||
@@ -590,7 +626,7 @@ fi
|
|||||||
#install ffmpeg
|
#install ffmpeg
|
||||||
if ! [ $osname = "Raspbian" ] && [ $(dpkg-query -W -f='${Status}' "ffmpeg" 2>/dev/null | grep -c "ok installed") = 0 ]; then
|
if ! [ $osname = "Raspbian" ] && [ $(dpkg-query -W -f='${Status}' "ffmpeg" 2>/dev/null | grep -c "ok installed") = 0 ]; then
|
||||||
echo "Installing ffmpeg"
|
echo "Installing ffmpeg"
|
||||||
apt-get -qq install ffmpeg >> $logfile 2>&1
|
aptitude -q=5 -y install ffmpeg >> $logfile 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Completed installation of required packages "
|
echo "Completed installation of required packages "
|
||||||
@@ -677,7 +713,7 @@ ftpport=$(random 41005 48995)
|
|||||||
|
|
||||||
if [ $(dpkg-query -W -f='${Status}' "vsftpd" 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
if [ $(dpkg-query -W -f='${Status}' "vsftpd" 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
echo "Installing vsftpd" | tee -a $logfile
|
echo "Installing vsftpd" | tee -a $logfile
|
||||||
apt-get -y install vsftpd >> $logfile 2>&1
|
aptitude -q=5 -y install vsftpd >> $logfile 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sed -i '/^\(\s\|#\)*anonymous_enable/ c\anonymous_enable=NO' /etc/vsftpd.conf
|
sed -i '/^\(\s\|#\)*anonymous_enable/ c\anonymous_enable=NO' /etc/vsftpd.conf
|
||||||
@@ -842,7 +878,7 @@ if [ -d "/var/www/rutorrent" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $rudevflag = 1 ]; then
|
if [ $rudevflag = 1 ]; then
|
||||||
rurelease=$(git ls-remote -t https://github.com/Novik/ruTorrent v\* | cut -d/ -f3 | sort -V | tail -1)
|
rurelease=$(curl -s "https://api.github.com/repos/Novik/ruTorrent/releases/latest" | awk -F '"' '/tag_name/{print $4}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Installing Rutorrent ($rurelease)" | tee -a $logfile
|
echo "Installing Rutorrent ($rurelease)" | tee -a $logfile
|
||||||
@@ -885,7 +921,7 @@ adlpass=$(genpasswd $(random 12 16))
|
|||||||
|
|
||||||
mkdir -p $home/.irssi/scripts/autorun
|
mkdir -p $home/.irssi/scripts/autorun
|
||||||
cd $home/.irssi/scripts
|
cd $home/.irssi/scripts
|
||||||
curl -sL http://git.io/vlcND | grep -Po '(?<="browser_download_url": ")(.*-v[\d.]+.zip)' | xargs wget --quiet -O autodl-irssi.zip
|
curl -sL http://git.io/vlcND | sed -n 's/.*browser_download_url": \?"\(.*zip\)".*/\1/p' | xargs wget --quiet -O autodl-irssi.zip
|
||||||
unzip -qq -o autodl-irssi.zip | tee -a $logfile
|
unzip -qq -o autodl-irssi.zip | tee -a $logfile
|
||||||
rm autodl-irssi.zip
|
rm autodl-irssi.zip
|
||||||
cp autodl-irssi.pl autorun/
|
cp autodl-irssi.pl autorun/
|
||||||
|
|||||||
+22
-18
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
headless=0
|
headless=0
|
||||||
osname=$(lsb_release -si)
|
osname=$(lsb_release -si)
|
||||||
|
releasename=$(lsb_release -cs)
|
||||||
|
|
||||||
[ -z $logfile ] && logfile="/dev/null"
|
[ -z $logfile ] && logfile="/dev/null"
|
||||||
if [ -z $serverip ]; then
|
if [ -z $serverip ]; then
|
||||||
headless=1
|
headless=1
|
||||||
@@ -24,19 +26,22 @@ fi
|
|||||||
if [ $headless = 1 ]; then
|
if [ $headless = 1 ]; then
|
||||||
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
||||||
serveripb=$(wget -qO- ipecho.net/plain)
|
serveripb=$(wget -qO- ipecho.net/plain)
|
||||||
if [ "$serveripa" = "$serveripb" ]; then
|
serveripc=$(wget -qO- --timeout=3 ipinfo.io/ip)
|
||||||
|
if [ "$serveripa" = "$serveripb" ] || [ "$serveripa" = "$serveripc" ]; then
|
||||||
serverip=$serveripa
|
serverip=$serveripa
|
||||||
else
|
else
|
||||||
echo "Select the IP address to use:"
|
echo "Select the IP address to use:"
|
||||||
echo "1.) "$serveripa
|
echo "1.) "$serveripa
|
||||||
echo "2.) "$serveripb
|
echo "2.) "$serveripb
|
||||||
|
echo "3.) "$serveripc
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
read answer
|
read answer
|
||||||
case $answer in [1] ) serverip=$serveripa && break ;;
|
case $answer in [1] ) serverip=$serveripa && break ;;
|
||||||
[2] ) serverip=$serveripb && break ;;
|
[2] ) serverip=$serveripb && break ;;
|
||||||
* ) echo "Enter 1 or 2";;
|
[3] ) serverip=$serveripc && break ;;
|
||||||
|
* ) echo "Enter 1, 2 or 3";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
@@ -51,27 +56,26 @@ if [ -z $serverdn ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#Installing Certbot
|
# Remove apt version of Certbot if installed
|
||||||
if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installed") = 0 ]; then
|
if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installed") = 1 ]; then
|
||||||
echo "Installing certbot"
|
echo "Removing apt version of Certbot"
|
||||||
|
aptitude -q=5 -y remove certbot python*-certbot-nginx >> $logfile 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$osname" = "Ubuntu" ]; then
|
# Install Snapd service
|
||||||
apt-get -q update >> $logfile 2>&1
|
aptitude -q=5 -y install snapd >> $logfile 2>&1
|
||||||
add-apt-repository -y universe >> $logfile 2>&1
|
# Install the core snap in order to get the latest snapd for Debian
|
||||||
add-apt-repository -y ppa:certbot/certbot >> $logfile 2>&1
|
if [ $osname = "Debian" ]; then snap install core >> $logfile 2>&1; snap refresh core; fi
|
||||||
apt-get -q update >> $logfile 2>&1
|
|
||||||
apt-get install -y certbot python-certbot-nginx >> $logfile 2>&1
|
# Installing Certbot
|
||||||
else
|
if [ $(snap list | grep -c "certbot") = 0 ]; then
|
||||||
deb_name=$(lsb_release --codename --short)
|
echo "Installing certbot"
|
||||||
grep "^deb http\:\/\/deb\.debian\.org\/debian $deb_name-backports main" /etc/apt/sources.list > /dev/null || echo "deb http://deb.debian.org/debian $deb_name-backports main" >> /etc/apt/sources.list
|
snap -y install --classic certbot >> $logfile 2>&1
|
||||||
apt-get -q update >> $logfile 2>&1
|
|
||||||
apt-get install -y certbot python-certbot-nginx -t stretch-backports >> $logfile 2>&1
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
echo "certbot already installed"
|
echo "certbot already installed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installed") = 0 ]; then
|
if [ $(snap list | grep -c "certbot") = 0 ]; then
|
||||||
echo "Install Failed"
|
echo "Install Failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
+5
-2
@@ -97,19 +97,22 @@ fi
|
|||||||
if [ -z $serverip ]; then
|
if [ -z $serverip ]; then
|
||||||
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
||||||
serveripb=$(wget -qO- ipecho.net/plain)
|
serveripb=$(wget -qO- ipecho.net/plain)
|
||||||
if [ "$serveripa" = "$serveripb" ]; then
|
serveripc=$(wget -qO- --timeout=3 ipinfo.io/ip)
|
||||||
|
if [ "$serveripa" = "$serveripb" ] || [ "$serveripa" = "$serveripc" ]; then
|
||||||
serverip=$serveripa
|
serverip=$serveripa
|
||||||
else
|
else
|
||||||
echo "Select the IP address to use:"
|
echo "Select the IP address to use:"
|
||||||
echo "1.) "$serveripa
|
echo "1.) "$serveripa
|
||||||
echo "2.) "$serveripb
|
echo "2.) "$serveripb
|
||||||
|
echo "3.) "$serveripc
|
||||||
|
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
read answer
|
read answer
|
||||||
case $answer in [1] ) serverip=$serveripa && break ;;
|
case $answer in [1] ) serverip=$serveripa && break ;;
|
||||||
[2] ) serverip=$serveripb && break ;;
|
[2] ) serverip=$serveripb && break ;;
|
||||||
* ) echo "Enter 1 or 2";;
|
[3] ) serverip=$serveripc && break ;;
|
||||||
|
* ) echo "Enter 1, 2 or 3";;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|||||||
+33
-14
@@ -12,21 +12,39 @@ PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
|||||||
|
|
||||||
osname=$(lsb_release -si)
|
osname=$(lsb_release -si)
|
||||||
relno=$(lsb_release -sr | cut -d. -f1)
|
relno=$(lsb_release -sr | cut -d. -f1)
|
||||||
|
fullrelno=$(lsb_release -sr)
|
||||||
|
|
||||||
|
# Fallback if lsb_release -si returns nothing
|
||||||
|
if [ "$osname" = "" ]; then
|
||||||
|
osname=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
|
||||||
|
osname=${osname^}
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Fallback if lsb_release -sr returns nothing
|
||||||
|
if [ "$relno" = "" ]; then
|
||||||
|
relno=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"' | cut -d. -f1)
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$fullrelno" = "" ]; then
|
||||||
|
fullrelno=$(grep -oP '(?<=^VERSION_ID=).+' /etc/os-release | tr -d '"')
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
sourcedir='http://rtorrent.net/downloads/'
|
sourcedir='http://rtorrent.net/downloads/'
|
||||||
|
|
||||||
xmlrpc_url='https://svn.code.sf.net/p/xmlrpc-c/code/advanced/'
|
xmlrpc_url='https://svn.code.sf.net/p/xmlrpc-c/code/stable/'
|
||||||
xmlrpcloc='svn://svn.code.sf.net/p/xmlrpc-c/code/advanced/'
|
xmlrpcloc='svn://svn.code.sf.net/p/xmlrpc-c/code/stable/'
|
||||||
|
|
||||||
xmlrpc_url_alt='https://github.com/mirror/xmlrpc-c'
|
xmlrpc_url_alt='https://github.com/mirror/xmlrpc-c'
|
||||||
xmlrpcloc_alt='https://github.com/mirror/xmlrpc-c/trunk/advanced'
|
xmlrpcloc_alt='https://github.com/mirror/xmlrpc-c/trunk/stable'
|
||||||
|
|
||||||
rtdevrel=1
|
rtdevrel=1
|
||||||
|
|
||||||
if [ $(lsb_release -sr) = 17.10 ]; then
|
if [ "$fullrelno" = "17.10" ]; then
|
||||||
rtdevrel=0
|
rtdevrel=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ([ "$osname" = "Debian" ] || [ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Ubuntu" ] && [ $relno -ge 18 ]); then
|
if ([ "$osname" = "Debian" ] || [ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Ubuntu" ] && [ $relno -ge 18 ]) || ([ "$osname" = "Linuxmint" ] && [ $relno -ge 18 ]); then
|
||||||
rtdevrel=0
|
rtdevrel=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -57,7 +75,7 @@ hash $1 2>/dev/null
|
|||||||
|
|
||||||
#function to check if a web site is reachable
|
#function to check if a web site is reachable
|
||||||
check_url() {
|
check_url() {
|
||||||
if [[ `wget -S --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then return 0; else return 1; fi
|
if [[ `wget -S -T 3 --spider $1 2>&1 | grep 'HTTP/1.1 200 OK'` ]]; then return 0; else return 1; fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# function to create a list of versions to install
|
# function to create a list of versions to install
|
||||||
@@ -139,7 +157,7 @@ if [ -z $passed_rtvers ]; then
|
|||||||
|
|
||||||
# checks if the OS is debian 9, and forces the version to 0.9.7 of it is
|
# checks if the OS is debian 9, and forces the version to 0.9.7 of it is
|
||||||
if [ $rtdevrel = 0 ]; then
|
if [ $rtdevrel = 0 ]; then
|
||||||
echo "For Debian 9, and Ubuntu 17.10 and later, recommend libtorrent-0.13.7/rtorrent-0.9.7 or later"
|
echo "For Debian 9, Ubuntu 17.10 or later and Linux Mint 17 or later, libtorrent-0.13.7/rtorrent-0.9.7 or later is recommended"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
list_version
|
list_version
|
||||||
@@ -166,7 +184,7 @@ else
|
|||||||
if [ $rtdevrel = 0 ]; then
|
if [ $rtdevrel = 0 ]; then
|
||||||
libvers='0.13.8'
|
libvers='0.13.8'
|
||||||
rtvers='0.9.8'
|
rtvers='0.9.8'
|
||||||
echo "Debian 9, and Ubuntu 17.10 and later, are only supported by libtorrent-0.13.7/rtorrent-0.9.7 or later"
|
echo "Debian 9, Ubuntu 17.10 or later and Linux Mint 17 or later are only supported by libtorrent-0.13.7/rtorrent-0.9.7 or later"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
@@ -200,16 +218,19 @@ echo "Fetching source files"
|
|||||||
|
|
||||||
if [ $xmlrpc_repo = 0 ]; then
|
if [ $xmlrpc_repo = 0 ]; then
|
||||||
svn co $xmlrpcloc xmlrpc >> $logfile 2>&1
|
svn co $xmlrpcloc xmlrpc >> $logfile 2>&1
|
||||||
|
if [ ! -e xmlrpc ]; then
|
||||||
|
git clone $xmlrpc_url_alt xmlrpc >> $logfile 2>&1
|
||||||
|
cd xmlrpc/stable
|
||||||
|
else cd xmlrpc; fi
|
||||||
|
|
||||||
cd xmlrpc
|
|
||||||
echo "Installing xmlrpc" | tee -a $logfile
|
echo "Installing xmlrpc" | tee -a $logfile
|
||||||
./configure --prefix=/usr --disable-cplusplus >> $logfile 2>&1
|
./configure --prefix=/usr --disable-cplusplus >> $logfile 2>&1
|
||||||
make -j$(nproc) >> $logfile 2>&1
|
make -j$(nproc) >> $logfile 2>&1
|
||||||
make -s install >> $logfile 2>&1
|
make -s install >> $logfile 2>&1
|
||||||
cd ..
|
cd $home/source
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd libtorrent-$libvers
|
cd libtorrent*
|
||||||
echo "Installing libtorrent" | tee -a $logfile
|
echo "Installing libtorrent" | tee -a $logfile
|
||||||
./autogen.sh >> $logfile 2>&1
|
./autogen.sh >> $logfile 2>&1
|
||||||
if [ $osname = "Raspbian" ]; then
|
if [ $osname = "Raspbian" ]; then
|
||||||
@@ -220,7 +241,7 @@ fi
|
|||||||
make -j$(nproc) >> $logfile 2>&1
|
make -j$(nproc) >> $logfile 2>&1
|
||||||
make -s install >> $logfile 2>&1
|
make -s install >> $logfile 2>&1
|
||||||
|
|
||||||
cd ../rtorrent-$rtvers
|
cd ../rtorrent*
|
||||||
echo "Installing rtorrent" | tee -a $logfile
|
echo "Installing rtorrent" | tee -a $logfile
|
||||||
./autogen.sh >> $logfile 2>&1
|
./autogen.sh >> $logfile 2>&1
|
||||||
./configure --prefix=/usr --with-xmlrpc-c --enable-ipv6 >> $logfile 2>&1
|
./configure --prefix=/usr --with-xmlrpc-c --enable-ipv6 >> $logfile 2>&1
|
||||||
@@ -228,8 +249,6 @@ make -j$(nproc) >> $logfile 2>&1
|
|||||||
make -s install >> $logfile 2>&1
|
make -s install >> $logfile 2>&1
|
||||||
ldconfig >> $logfile 2>&1
|
ldconfig >> $logfile 2>&1
|
||||||
|
|
||||||
echo "$libvers/$rtvers installed"
|
|
||||||
echo
|
|
||||||
|
|
||||||
if [ -d /var/www/rutorrent/conf/users ]; then
|
if [ -d /var/www/rutorrent/conf/users ]; then
|
||||||
cd /var/www/rutorrent/conf/users
|
cd /var/www/rutorrent/conf/users
|
||||||
|
|||||||
+3
-3
@@ -9,7 +9,7 @@
|
|||||||
######################################################################
|
######################################################################
|
||||||
|
|
||||||
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/bin:/sbin
|
||||||
serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $NF}')
|
serverip=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
|
||||||
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
if [ "$(id -u)" != "0" ]; then
|
||||||
echo "Must be run as root, directly or with sudo"
|
echo "Must be run as root, directly or with sudo"
|
||||||
@@ -20,8 +20,8 @@ if [ $(dpkg-query -W -f='${Status}' webmin 2>/dev/null | grep -c "ok installed")
|
|||||||
echo "Installing Webmin"
|
echo "Installing Webmin"
|
||||||
echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
|
echo "deb http://download.webmin.com/download/repository sarge contrib" > /etc/apt/sources.list.d/webmin.list
|
||||||
wget -qO - http://www.webmin.com/jcameron-key.asc | apt-key add -
|
wget -qO - http://www.webmin.com/jcameron-key.asc | apt-key add -
|
||||||
apt-get -qq update
|
aptitude -q=5 update
|
||||||
apt-get -qq install webmin
|
aptitude -q=5 -y install webmin
|
||||||
else
|
else
|
||||||
echo 'Webmin is already installed'
|
echo 'Webmin is already installed'
|
||||||
fi
|
fi
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ newvers=$(curl -s https://raw.githubusercontent.com/Novik/ruTorrent/master/js/we
|
|||||||
oldvers=$(grep -m 1 version: /var/www/rutorrent/js/webui.js | cut -d \" -f2)
|
oldvers=$(grep -m 1 version: /var/www/rutorrent/js/webui.js | cut -d \" -f2)
|
||||||
|
|
||||||
ruflag=0
|
ruflag=0
|
||||||
rurelease=$(git ls-remote -t https://github.com/Novik/ruTorrent v\* | cut -d/ -f3 | sort -V | tail -1)
|
rurelease=$(curl -s "https://api.github.com/repos/Novik/ruTorrent/releases/latest" | awk -F '"' '/tag_name/{print $4}')
|
||||||
force_yes=1
|
force_yes=1
|
||||||
restore_old=1
|
restore_old=1
|
||||||
install_master=1
|
install_master=1
|
||||||
|
|||||||
Reference in New Issue
Block a user