1
0
mirror of https://github.com/tommytran732/Pterodactyl-Script synced 2024-09-16 14:14:42 -04:00

Remade Certbot Install

This commit is contained in:
HeyJack 2020-10-15 16:23:52 +01:00
parent b4a75e8c1b
commit 00b2231404

View File

@ -1769,7 +1769,7 @@ ssl_certs(){
fi
fi
if [ "$lsb_dist" = "debian" ] || [ "$lsb_dist" = "ubuntu" ]; then
if [ "$lsb_dist" = "debian" ] || [ "$lsb_dist" = "ubuntu" ]; then
if [ "$installoption" = "1" ]; then
if [ "$webserver" = "1" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service nginx stop" --post-hook "service nginx restart" >> /dev/null 2>&1')| crontab -
@ -1783,10 +1783,9 @@ ssl_certs(){
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service apache2 stop" --post-hook "service apache2 restart" >> /dev/null 2>&1')| crontab -
fi
elif [ "$installoption" = "3" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "ufw allow 80" --pre-hook "service wings stop" --post-hook "ufw deny 80" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "ufw allow 80" --pre-hook "service wings stop" --post-hook "ufw deny 80" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
elif [ "$installoption" = "4" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "ufw allow 80" --pre-hook "service wings stop" --post-hook "ufw deny 80" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
fi
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "ufw allow 80" --pre-hook "service wings stop" --post-hook "ufw deny 80" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
elif [ "$installoption" = "5" ]; then
if [ "$webserver" = "1" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service nginx stop" --pre-hook "service wings stop" --post-hook "service nginx restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
@ -1799,7 +1798,7 @@ ssl_certs(){
elif [ "$webserver" = "2" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service apache2 stop" --pre-hook "service wings stop" --post-hook "service apache2 restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
fi
fi
fi
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ]; then
if [ "$installoption" = "1" ]; then
if [ "$webserver" = "1" ]; then
@ -1823,13 +1822,18 @@ ssl_certs(){
elif [ "$webserver" = "2" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service httpd stop" --pre-hook "service wings stop" --post-hook "service httpd restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
fi
elif [ "$installoption" = "6" ]; then
elif [ "$installoption" = "5" ]; then
if [ "$webserver" = "1" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service nginx stop" --pre-hook "service wings stop" --post-hook "service nginx restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
elif [ "$webserver" = "2" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service httpd stop" --pre-hook "service wings stop" --post-hook "service httpd restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
fi
elif [ "$installoption" = "6" ]; then
if [ "$webserver" = "1" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service nginx stop" --pre-hook "service wings stop" --post-hook "service nginx restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
elif [ "$webserver" = "2" ]; then
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service httpd stop" --pre-hook "service wings stop" --post-hook "service httpd restart" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
fi
fi
fi
}