Check if files/folders exists, remove reload-hook
This commit is contained in:
11
install.sh
11
install.sh
@@ -1,7 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
rm -rf /usr/local/nginx
|
||||
rm /etc/systemd/system/nginx.service
|
||||
if [[ -d /usr/local/nginx ]]; then
|
||||
rm -rf /usr/local/nginx
|
||||
fi
|
||||
|
||||
if [[ -f /etc/systemd/system/nginx.service ]]; then
|
||||
rm /etc/systemd/system/nginx.service
|
||||
fi
|
||||
|
||||
lowercase(){
|
||||
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
@@ -67,7 +72,7 @@ if [ "$ifle" == "Y" ] || [ "$ifle" == "y" ]; then
|
||||
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 -
|
||||
crontab -l | { cat; echo "@weekly certbot renew --pre-hook 'systemctl stop nginx' --post-hook 'systemctl start nginx' --quiet"; } | crontab -
|
||||
fi
|
||||
|
||||
if [ "$DIST" == "Fedora" ]; then
|
||||
|
||||
Reference in New Issue
Block a user