Compare commits

..
21 Commits
Author SHA1 Message Date
arakasi72 39c28cc1a3 Merge pull request #593 from arakasi72/develop
Develop
2022-03-06 19:26:50 +00:00
arakasi72 7e57727b1f Merge pull request #585 from mahmood61/develop
Ubuntu 21 Support
2022-03-06 19:23:01 +00:00
mahmood61 fe45572921 ubuntu 21 fix 2021-10-10 00:45:02 -04:00
arakasi72 095db1ac33 Update README.md 2021-08-22 23:55:47 +01:00
arakasi72 5cee68c881 Merge pull request #581 from arakasi72/rtorrentnewloc
Rtorrentnewloc
2021-08-22 11:23:41 +01:00
arakasi72 f8d667c6e3 Update rtinst 2021-08-22 10:54:20 +01:00
arakasi72 9ffbf03938 Update rtupdate 2021-08-22 10:48:10 +01:00
arakasi72 9cf742a0fb Update rtupdate 2021-08-22 10:37:28 +01:00
arakasi72 d66db0d049 Update rtupdate 2021-08-22 10:32:06 +01:00
arakasi72 34833cb5e2 Update rtupdate 2021-08-22 10:26:41 +01:00
arakasi72 86c148966f Update rtupdate 2021-08-22 10:22:10 +01:00
arakasi72 61556b73ea Update rtupdate 2021-08-22 09:28:42 +01:00
arakasi72 67484c6813 Update rtupdate 2021-08-22 09:25:48 +01:00
arakasi72 627b5c25e9 Update rtinst 2021-08-22 09:10:21 +01:00
arakasi72 bf06620c85 Update rtinst 2021-08-22 09:06:44 +01:00
arakasi72 0d4ae9b317 Merge pull request #558 from ashura82/patch-1
Update rtletsencrypt
2021-04-17 00:32:51 +01:00
ashura82 e13bc2b706 Update rtletsencrypt 2020-12-29 14:29:32 +01:00
V33m f9615fe823 Update fallback for OS checking 2020-11-21 23:52:26 +01:00
V33m 14c270f096 Update rtupdate - Typo 2020-09-10 23:19:54 +02:00
V33m 5452c98799 Update rtupdate
Added fallback to svn when installing xmlrpc
2020-09-10 23:17:38 +02:00
V33m 016299230e Update rtletsencrypt
Should solve Issue: https://github.com/arakasi72/rtinst/issues/528
2020-09-10 23:09:25 +02:00
4 changed files with 31 additions and 99 deletions
-9
View File
@@ -47,15 +47,6 @@ Services that will be installed and configured are
[Additional information on all the features](https://github.com/arakasi72/rtinst/wiki/Guide)
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)
-------------------------------------------------------------------------
+11 -5
View File
@@ -182,10 +182,10 @@ echo $ip_address
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'
rtorrentrel='0.9.8'
#url's of the major components
rt_url="http://rtorrent.net/downloads/"
rt_url="https://rakshasa.github.io/rtorrent/"
xmlrpc_url="https://svn.code.sf.net/p/xmlrpc-c/code/advanced/"
xmlrpc_url_alt="https://github.com/mirror/xmlrpc-c"
@@ -199,11 +199,11 @@ if [ $(dpkg-query -W -f='${Status}' lsb-release 2>/dev/null | grep -c "ok instal
fi
fullrel=$(lsb_release -sd)
osname=$(lsb_release -si)
osname=$(lsb_release -si); osname=${osname^}
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" ]; then
if [ ! "$osname" = "Ubuntu" ] && [ ! "$osname" = "Debian" ] && [ ! "$osname" = "Raspbian" ]; then
osname=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
osname=${osname^}
fi
@@ -243,6 +243,12 @@ if [ "$relno" = "20" ] || [ "$(lsb_release -sr)" = "20.04" ] || [ "$relno" = "11
libcver=libcurl4
fi
if [ "$relno" = "21" ] || [ "$(lsb_release -sr)" = "21.04" ]; 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)
@@ -551,7 +557,7 @@ echo "Updating package lists" | tee $logfile
apt-get -qq update | tee -a $logfile
# Installing Aptitude
apt-get -qqy install aptitude
apt-get -qqy install aptitude >> $logfile 2>&1
echo "Upgrading packages" | tee -a $logfile
export DEBIAN_FRONTEND=noninteractive
+6 -8
View File
@@ -62,19 +62,15 @@ if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installe
aptitude -q=5 -y remove certbot python*-certbot-nginx >> $logfile 2>&1
fi
# Install Snapd service if not installed
if [ $(dpkg-query -W -f='${Status}' "snapd" 2>/dev/null | grep -c "ok installed") = 0 ]; then
echo "Installing snapd service"
aptitude -q=5 -y install snapd >> $logfile 2>&1
fi
# Install Snapd service
aptitude -q=5 -y install snapd >> $logfile 2>&1
# Install the core snap in order to get the latest snapd for Debian
if [ $osname = "Debian" ]; then snap install core >> $logfile 2>&1 && snap refresh core; fi
if [ $osname = "Debian" ]; then snap install core >> $logfile 2>&1; snap refresh core; fi
# Installing Certbot
if [ $(snap list | grep -c "certbot") = 0 ]; then
echo "Installing certbot"
snap -y install --classic certbot >> $logfile 2>&1
snap install --classic certbot >> $logfile 2>&1
else
echo "certbot already installed"
fi
@@ -84,6 +80,8 @@ if [ $(snap list | grep -c "certbot") = 0 ]; then
exit 1
fi
#Prepare certbot command
ln -s /snap/bin/certbot /usr/bin/certbot
#Generating Certificates
certbot -q --nginx --register-unsafely-without-email --agree-tos certonly -d $serverdn >> $logfile 2>&1
+14 -77
View File
@@ -30,7 +30,7 @@ if [ "$fullrelno" = "" ]; then
fi
sourcedir='http://rtorrent.net/downloads/'
sourcedir='https://rakshasa.github.io/rtorrent/'
xmlrpc_url='https://svn.code.sf.net/p/xmlrpc-c/code/stable/'
xmlrpcloc='svn://svn.code.sf.net/p/xmlrpc-c/code/stable/'
@@ -40,33 +40,13 @@ xmlrpcloc_alt='https://github.com/mirror/xmlrpc-c/trunk/stable'
rtdevrel=1
if [ "$fullrelno" = "17.10" ]; then
rtdevrel=0
fi
libvers='0.13.8'
rtvers='0.9.8'
if ([ "$osname" = "Debian" ] || [ "$osname" = "Raspbian" ] && [ $relno -ge 9 ]) || ([ "$osname" = "Ubuntu" ] && [ $relno -ge 18 ]); then
rtdevrel=0
fi
listsize=6
duoversion=''
passed_rtvers=$1
[ -z $logfile ] && logfile="/dev/null"
# get a list of the most recent releases
rt_releases=$(wget -q -O - $sourcedir | grep -o "rtorrent-[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}\.tar.gz" | sort -uV | tail -$listsize | grep -o "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}")
# extract the release numbers from the list of most recent releases
for rtversion in $rt_releases
do
libversion=$(echo $rtversion | awk -F. -v OFS=. '{$2='$(( $(echo $rtversion | cut -d. -f2) + 4 ))'; print }')
duoversion="$duoversion $libversion/$rtversion"
done
# get the most recent release version number
latest_duo=$(echo $duoversion | rev | cut -d' ' -f1 | rev)
latest_libvers=$(echo $latest_duo | cut -d/ -f1)
latest_rtvers=$(echo $latest_duo | cut -d/ -f2)
# checks if an application is installed
installed() {
@@ -78,20 +58,6 @@ check_url() {
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
list_version() {
local verschoice
while [ -z "$verschoice" ]
do
echo "Please select libtorrent/rtorrent version."
select verschoice in ${duoversion[*]}
do
libvers=$(echo $verschoice | cut -d/ -f1)
rtvers=$(echo $verschoice | cut -d/ -f2)
break
done
done
}
ask_user(){
local answer
@@ -149,46 +115,15 @@ if [ -z $passed_rtvers ]; then
if ( installed rtorrent ); then
rt_current=$(rtorrent -h | grep -om 1 "[0-9]\{1,2\}\.[0-9]\{1,2\}\.[0-9]\{1,2\}")
echo "rtorrent $rt_current detected"
exit 1
else
echo "rtorrent NOT installed"
echo "This script is for upgrading/downgrading only, not for initial install"
exit 1
fi
# checks if the OS is debian 9, and forces the version to 0.9.7 of it is
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"
fi
list_version
echo "Install libtorrent-$libvers and rtorrent-$rtvers"
echo "Your rtorrent config, torrents, and data will not be lost or changed"
echo -n "Continue? "
if ! ask_user; then
exit
fi
else
if [ "$passed_rtvers" = "latest" ] || [ $(wget -q -O - $sourcedir | grep -o "rtorrent-$passed_rtvers.tar.gz" | wc -l) -eq 0 ]; then
if [ "$passed_rtvers" != "latest" ]; then
echo " Could not find $passed_rtvers so using latest version instead"
fi
libvers=$latest_libvers
rtvers=$latest_rtvers
else
libvers=$(echo $passed_rtvers | awk -F. -v OFS=. '{$2='$(( $(echo $rtversion | cut -d. -f2) + 4 ))'; print }')
rtvers=$passed_rtvers
fi
# checks if the OS is debian 9, and forces the version to 0.9.7 of it is
if [ $rtdevrel = 0 ]; then
libvers='0.13.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"
fi
fi
if [ -z "$home" ]; then
home=$HOME
fi
@@ -207,24 +142,28 @@ rm -rf xmlrpc libtorrent* rtorrent*
echo "Fetching source files"
#if [ $rtdevrel = 0 ]; then
# git clone -q -b feature-bind --single-branch https://github.com/rakshasa/libtorrent.git libtorrent-$libvers
# git clone -q -b feature-bind --single-branch https://github.com/rakshasa/rtorrent.git rtorrent-$rtvers
#else
curl -# http://rtorrent.net/downloads/libtorrent-$libvers.tar.gz | tar xz
curl -# http://rtorrent.net/downloads/rtorrent-$rtvers.tar.gz | tar xz
curl -LOJ# https://github.com/rakshasa/rtorrent-archive/raw/master/libtorrent-$libvers.tar.gz
tar -xzf libtorrent-$libvers.tar.gz
curl -LOJ# https://github.com/rakshasa/rtorrent-archive/raw/master/rtorrent-$rtvers.tar.gz
tar -xzf rtorrent-$rtvers.tar.gz
#fi
if [ $xmlrpc_repo = 0 ]; then
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
./configure --prefix=/usr --disable-cplusplus >> $logfile 2>&1
make -j$(nproc) >> $logfile 2>&1
make -s install >> $logfile 2>&1
cd ..
cd $home/source
fi
cd libtorrent-$libvers
@@ -246,8 +185,6 @@ make -j$(nproc) >> $logfile 2>&1
make -s install >> $logfile 2>&1
ldconfig >> $logfile 2>&1
echo "$libvers/$rtvers installed"
echo
if [ -d /var/www/rutorrent/conf/users ]; then
cd /var/www/rutorrent/conf/users