SSL-Option hinzugefügt (Lets Encrypt)
This commit is contained in:
16
install.sh
16
install.sh
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf /usr/local/nginx
|
||||
rm /etc/systemd/system/nginx.service
|
||||
|
||||
lowercase(){
|
||||
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
}
|
||||
@@ -56,6 +59,17 @@ else
|
||||
|
||||
fi
|
||||
|
||||
read -p 'Soll Nginx mit Lets Encrypt eingerichtet werden? (Y/n)' ifle
|
||||
|
||||
if [ "$ifle" == "Y" ] || [ "$ifle" == "y" ]; then
|
||||
git clone https://github.com/certbot/certbot.git /opt/certbot
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/bin/certbot
|
||||
ln -s /opt/certbot/certbot-auto /usr/local/bin/letsencrypt
|
||||
cp make_cert /usr/local/bin
|
||||
chmod +x /usr/local/bin/make_cert
|
||||
crontab -l | { cat; echo "@weekly certbot renew --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' --renew-hook 'systemctl reload nginx' --quiet"; } | crontab -
|
||||
fi
|
||||
|
||||
if [ "$DIST" == "Fedora" ]; then
|
||||
dnf install gcc gcc-c++ autoconf automake make perl -y
|
||||
elif [ "$DIST" == "Ubuntu" ] || [ "$DistroBasedOn" == "debian" ]; then
|
||||
@@ -113,6 +127,8 @@ cd /usr/local/nginx
|
||||
mkdir sites-available
|
||||
mkdir sites-enabled
|
||||
|
||||
ln -s /usr/local/nginx /usr/local/bin/nginx
|
||||
|
||||
echo ""
|
||||
echo "----------------"
|
||||
echo "Installation abgeschlossen!"
|
||||
|
||||
Reference in New Issue
Block a user