mirror of
https://github.com/elisspace/rtinst.git
synced 2026-10-06 17:16:22 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d4ae9b317 | ||
|
|
e13bc2b706 | ||
|
|
f9615fe823 | ||
|
|
14c270f096 | ||
|
|
5452c98799 | ||
|
|
016299230e | ||
|
|
763d2efdeb |
+2
-2
@@ -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
|
||||
|
||||
+17
-20
@@ -56,35 +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
|
||||
# Verify if current distribution (release name, ex. focal) has available PPA packages
|
||||
wget -qO- http://ppa.launchpad.net/certbot/certbot/ubuntu/dists/ | grep -q "$releasename" && USE_PPA=y
|
||||
if [ "$USE_PPA" = "y" ]; then
|
||||
aptitude -q=5 update >> $logfile 2>&1
|
||||
add-apt-repository -y universe >> $logfile 2>&1
|
||||
add-apt-repository -y ppa:certbot/certbot >> $logfile 2>&1
|
||||
fi
|
||||
aptitude -q=5 update >> $logfile 2>&1
|
||||
aptitude -q=5 -y install 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
|
||||
aptitude -q=5 update >> $logfile 2>&1
|
||||
aptitude -q=5 -y install 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
|
||||
|
||||
+7
-6
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user