Compare commits

...
27 Commits
Author SHA1 Message Date
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
V33m 763d2efdeb Update rtletsencrypt to use snapd for certbot
Solves Issue: https://github.com/arakasi72/rtinst/issues/526.

Snapd is the recommended way to install certbot and it is a service that manages and maintains your snaps. A snap is a bundle of an app and its dependencies that works without modification across Linux distributions.
2020-09-03 12:40:45 +02:00
V33m 1f1ec0ad3a Update rtinst - add '-y' to aptitude upgrade 2020-08-30 09:39:44 +02:00
V33m b18b5718fe Update rtsetup
Use latest release instead of tag
2020-08-27 22:23:32 +02:00
V33m deff019f56 Use Aptitude to install packages 2020-08-27 21:42:52 +02:00
V33m 11a019cd16 Update README.md 2020-08-25 19:20:53 +02:00
V33m 0a8b21b8f3 Verify if PPA is available for current distribution
Added checking to verify if current distribution (release name, ex. focal) has available PPA packages. If not, packages will be installed from Ubuntu Package archive.

Solves Issue https://github.com/arakasi72/rtinst/issues/518 and https://github.com/arakasi72/rtinst/issues/522.
2020-08-25 19:12:33 +02:00
V33m c3cde97a74 Add fallback for fetching external ip (ipinfo.io)
If ipecho is down or the ISP is blocking it, there are no other ways to get external ip. Adding another fallback to ipinfo.io makes the issue that rtinst can't figure out the external ip less likely.

Issue: https://github.com/arakasi72/rtinst/issues/448
2020-08-15 00:11:41 +02:00
V33m 18dd935f18 Add correct php version for Debian 11
Debian 11, codename bullseye, is currently using the same versions as Ubuntu 20.
2020-08-14 16:24:51 +02:00
V33m 6935c58e6a Add php-zip module for multi-torrent downloading
Solves the issue "PHP module 'zip' is not installed." when selecting two or more items with "Get .torrent". Issue: https://github.com/arakasi72/rtinst/issues/516
2020-08-13 10:55:22 +02:00
V33m f9063b89d4 Update fetching latest ruTorrent release
Updates the method for how latest ruTorrent releases are found. Prior method sorted by name, which made suffixes such as -beta prioritised over stable (v3.10-beta over v3.10 etc.).
2020-07-05 10:34:31 +02:00
arakasi72 d2869bf416 Merge pull request #505 from V33m/patch-4
Update rutupgrade - Fetch latest release
2020-07-04 18:09:40 +01:00
arakasi72 e6523c1956 Merge pull request #496 from V33m/patch-3
Fallback if lsb_release -si does not return Ubuntu, Debian or Raspbian
2020-07-04 18:08:58 +01:00
arakasi72 3df3171d5c Merge pull request #494 from V33m/patch-2
Add support for Ubuntu 20.04
2020-07-04 18:07:24 +01:00
V33m 227eb998f2 Update rutupgrade - Fetch latest release
Updates the method for how latest releases are found. Prior method sorted by name, which made suffixes such as -beta prioritised over stable (v3.10-beta over v3.10 etc.).
2020-07-02 19:01:41 +02:00
V33m 3613eae1d9 Fallback if lsb_release -si does not return Ubuntu, Debian or Raspbian
Adds a fallback if lsb_release -si returns anything else than Ubuntu, Debian or Raspbian.

Should solve https://github.com/arakasi72/rtinst/issues/495. Needs testing and confirmation.
2020-04-26 11:25:46 +02:00
V33m 6c5191a144 Add support for Ubuntu 20.04
I've removed the package "python-scgi" which is for python2, however, we need to figure out if any packages are dependent on it for older OSes and if we need a supplement to it for python3 and future releases. PS: I've not tested this by myself. 

https://github.com/arakasi72/rtinst/issues/493
2020-04-25 10:14:41 +02:00
arakasi72 eef6d04d9d Merge pull request #486 from KaffeMyers/master
fix autodl-irrsi url extract
2020-03-31 09:42:34 +01:00
Simon "Kaffe" Wagemyr bde4bb2492 small fix for safety (account for possible whitespace, which probably was the original issue) 2020-03-31 04:01:42 +02:00
Simon "Kaffe" Wagemyr e7679d897b fix autodl-irrsi url extract 2020-03-31 03:46:13 +02:00
arakasi72 ba2a315b37 Update rtinst 2019-12-18 16:41:57 +00:00
arakasi72 a0be8c3278 Update rtinst 2019-12-18 16:31:45 +00:00
9 changed files with 78 additions and 55 deletions
+1
View File
@@ -29,6 +29,7 @@ Current release has been tested with clean installs of:
Ubuntu 17
Ubuntu 18
Ubuntu 19
Ubuntu 20
Debian 9 "Stretch"
Debian 10 "Buster"
+1 -1
View File
@@ -57,7 +57,7 @@ if [ -d /etc/rtinst ] && [ -z $branch ]; then
if [ -z $branch ]; then
branch=$(git describe --tags --exact-match)
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
echo "Updating from $branch to $latest"
branch=$latest
+1 -1
View File
@@ -353,7 +353,7 @@ echo "?>" >> /var/www/rutorrent/conf/users/$user/config.php
mkdir /var/www/rutorrent/conf/users/$user/plugins/autodl-irssi
mkdir -p $home/.irssi/scripts/autorun
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
rm autodl-irssi.zip
cp autodl-irssi.pl autorun/
+36 -24
View File
@@ -194,16 +194,16 @@ 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
echo "Installing lsb-release"
apt-get -yqq install lsb-release 2>&1 >> /dev/null
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 nothing
if [ "$osname" = "" ]; then
# Fallback if lsb_release -si returns anything else than Ubuntu, Debian or Raspbian
if [ ! "$osname" = "Ubuntu" ] && [ ! "$osname" = "Debian" ] && [ ! "$osname" = "Raspbian" ]; then
osname=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
osname=${osname^}
fi
@@ -231,28 +231,37 @@ if [ "$relno" = "18" ] || [ "$relno" = "19" ]; then
libcver=libcurl4
fi
if [ "$relno" = "10" ]; then
if [ "$relno" = "10" ] || [ "$(lsb_release -sr)" = "19.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 [ "$relno" = "20" ] || [ "$(lsb_release -sr)" = "20.04" ] || [ "$relno" = "11" ]; then
phpver=php7.4
phploc=/etc/php/7.4
libcver=libcurl4
fi
if [ "$serveripa" = "$serveripb" ]; then
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 ;;
* ) echo "Enter 1 or 2";;
[3] ) serverip=$serveripc && break ;;
* ) echo "Enter 1, 2 or 3";;
esac
done
fi
@@ -272,7 +281,7 @@ 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"
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
@@ -541,18 +550,21 @@ fi
echo "Updating package lists" | tee $logfile
apt-get -qq update | tee -a $logfile
# Installing Aptitude
apt-get -qqy install aptitude
echo "Upgrading packages" | tee -a $logfile
export DEBIAN_FRONTEND=noninteractive
apt-get -qq upgrade >> $logfile 2>&1
aptitude -q=5 -y upgrade >> $logfile 2>&1
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
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
apt-get install libtool -y >> $logfile 2>&1
aptitude -q=5 -y install libtool >> $logfile 2>&1
for package_name in $package_list
do
if [ $(apt-cache show -q=0 $package_name 2>&1 | grep -c "No packages found") -eq 0 ]; then
@@ -566,16 +578,16 @@ for package_name in $package_list
# Installs a package needed to prevent arm64 architectures from "WARNING: Unable to start rtorrent"
if [ "$(uname --m)" == "aarch64" ] || [ "$(dpkg --print-architecture)" == "arm64" ] ; then
sudo apt-get install libxmlrpc-core-c3-dev -y >> $logfile 2>&1
aptitude -q=5 -y install libxmlrpc-core-c3-dev >> $logfile 2>&1
fi
test -z "$install_list" || apt-get -qq install $install_list >> $logfile 2>&1
test -z "$install_list" || aptitude -q=5 -y install $install_list >> $logfile 2>&1
if ! [ $? = 0 ]; then
echo "Problem installing packages. Check log and rerun once it is resolved" && exit
fi
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
#install unrar package
@@ -602,7 +614,7 @@ if [ $osname = "Debian" ] && ! installed unrar; then
rm -r $home/rar
fi
elif [ $osname = "Ubuntu" ]; then
apt-get -qq install unrar >> $logfile 2>&1
aptitude -q=5 -y install unrar >> $logfile 2>&1
fi
if installed unrar; then
@@ -614,7 +626,7 @@ fi
#install ffmpeg
if ! [ $osname = "Raspbian" ] && [ $(dpkg-query -W -f='${Status}' "ffmpeg" 2>/dev/null | grep -c "ok installed") = 0 ]; then
echo "Installing ffmpeg"
apt-get -qq install ffmpeg >> $logfile 2>&1
aptitude -q=5 -y install ffmpeg >> $logfile 2>&1
fi
echo "Completed installation of required packages "
@@ -701,7 +713,7 @@ ftpport=$(random 41005 48995)
if [ $(dpkg-query -W -f='${Status}' "vsftpd" 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
echo "Installing vsftpd" | tee -a $logfile
apt-get -y install vsftpd >> $logfile 2>&1
aptitude -q=5 -y install vsftpd >> $logfile 2>&1
fi
sed -i '/^\(\s\|#\)*anonymous_enable/ c\anonymous_enable=NO' /etc/vsftpd.conf
@@ -866,7 +878,7 @@ if [ -d "/var/www/rutorrent" ]; then
fi
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
echo "Installing Rutorrent ($rurelease)" | tee -a $logfile
@@ -909,7 +921,7 @@ adlpass=$(genpasswd $(random 12 16))
mkdir -p $home/.irssi/scripts/autorun
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
rm autodl-irssi.zip
cp autodl-irssi.pl autorun/
+24 -18
View File
@@ -11,6 +11,8 @@
headless=0
osname=$(lsb_release -si)
releasename=$(lsb_release -cs)
[ -z $logfile ] && logfile="/dev/null"
if [ -z $serverip ]; then
headless=1
@@ -24,19 +26,22 @@ fi
if [ $headless = 1 ]; then
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
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
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 ;;
* ) echo "Enter 1 or 2";;
[3] ) serverip=$serveripc && break ;;
* ) echo "Enter 1, 2 or 3";;
esac
done
fi
@@ -51,31 +56,32 @@ if [ -z $serverdn ]; then
exit 1
fi
#Installing Certbot
if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installed") = 0 ]; then
echo "Installing certbot"
# Remove apt version of Certbot if installed
if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installed") = 1 ]; then
echo "Removing apt version of Certbot"
aptitude -q=5 -y remove certbot python*-certbot-nginx >> $logfile 2>&1
fi
if [ "$osname" = "Ubuntu" ]; then
apt-get -q update >> $logfile 2>&1
add-apt-repository -y universe >> $logfile 2>&1
add-apt-repository -y ppa:certbot/certbot >> $logfile 2>&1
apt-get -q update >> $logfile 2>&1
apt-get install -y certbot python-certbot-nginx >> $logfile 2>&1
else
deb_name=$(lsb_release --codename --short)
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
apt-get -q update >> $logfile 2>&1
apt-get install -y certbot python-certbot-nginx -t $deb_name-backports >> $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
# Installing Certbot
if [ $(snap list | grep -c "certbot") = 0 ]; then
echo "Installing certbot"
snap install --classic certbot >> $logfile 2>&1
else
echo "certbot already installed"
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"
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
+5 -2
View File
@@ -97,19 +97,22 @@ fi
if [ -z $serverip ]; then
serveripa=$(ip route get 8.8.8.8 | awk 'NR==1 {print $7}')
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
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 ;;
* ) echo "Enter 1 or 2";;
[3] ) serverip=$serveripc && break ;;
* ) echo "Enter 1, 2 or 3";;
esac
done
fi
+7 -6
View File
@@ -218,16 +218,19 @@ echo "Fetching source files"
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
cd libtorrent*
echo "Installing libtorrent" | tee -a $logfile
./autogen.sh >> $logfile 2>&1
if [ $osname = "Raspbian" ]; then
@@ -238,7 +241,7 @@ fi
make -j$(nproc) >> $logfile 2>&1
make -s install >> $logfile 2>&1
cd ../rtorrent-$rtvers
cd ../rtorrent*
echo "Installing rtorrent" | tee -a $logfile
./autogen.sh >> $logfile 2>&1
./configure --prefix=/usr --with-xmlrpc-c --enable-ipv6 >> $logfile 2>&1
@@ -246,8 +249,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
+2 -2
View File
@@ -20,8 +20,8 @@ if [ $(dpkg-query -W -f='${Status}' webmin 2>/dev/null | grep -c "ok installed")
echo "Installing Webmin"
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 -
apt-get -qq update
apt-get -qq install webmin
aptitude -q=5 update
aptitude -q=5 -y install webmin
else
echo 'Webmin is already installed'
fi
+1 -1
View File
@@ -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)
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
restore_old=1
install_master=1