mirror of
https://github.com/elisspace/rtinst.git
synced 2026-10-06 17:16:22 +00:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d4ae9b317 | ||
|
|
e13bc2b706 | ||
|
|
f9615fe823 |
+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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user