Compare commits

..
2 Commits
Author SHA1 Message Date
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
2 changed files with 12 additions and 5 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"
+11 -5
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
@@ -59,11 +61,15 @@ if [ $(dpkg-query -W -f='${Status}' "certbot" 2>/dev/null | grep -c "ok installe
echo "Installing certbot"
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
# 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
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
fi
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