Compare commits

...
3 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
2 changed files with 5 additions and 3 deletions
+2 -2
View File
@@ -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
+3 -1
View File
@@ -70,7 +70,7 @@ if [ $osname = "Debian" ]; then snap install core >> $logfile 2>&1; snap refresh
# 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
@@ -80,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