mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-26 04:01:34 -05:00
Remove useless code
Removed left over Debian 8 code
This commit is contained in:
parent
34558ee2a1
commit
9c54483d91
28
install.sh
28
install.sh
@ -1155,12 +1155,7 @@ ssl_certs(){
|
|||||||
output "Installing Let's Encrypt and creating an SSL certificate..."
|
output "Installing Let's Encrypt and creating an SSL certificate..."
|
||||||
cd /root
|
cd /root
|
||||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||||
if [ "$lsb_dist" = "debian" ] && [ "$dist_version" = "8" ]; then
|
|
||||||
wget https://dl.eff.org/certbot-auto
|
|
||||||
chmod a+x certbot-auto
|
|
||||||
else
|
|
||||||
apt-get -y install certbot
|
apt-get -y install certbot
|
||||||
fi
|
|
||||||
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ]; then
|
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ]; then
|
||||||
yum -y install certbot
|
yum -y install certbot
|
||||||
fi
|
fi
|
||||||
@ -1174,11 +1169,8 @@ ssl_certs(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$lsb_dist" = "debian" ] && [ "$dist_version" = "8" ]; then
|
|
||||||
./certbot-auto certonly --standalone --email "$email" --agree-tos -d "$FQDN" --non-interactive
|
|
||||||
else
|
|
||||||
certbot certonly --standalone --email "$email" --agree-tos -d "$FQDN" --non-interactive
|
certbot certonly --standalone --email "$email" --agree-tos -d "$FQDN" --non-interactive
|
||||||
fi
|
|
||||||
if [ "$installoption" = "2" ]; then
|
if [ "$installoption" = "2" ]; then
|
||||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||||
ufw deny 80
|
ufw deny 80
|
||||||
@ -1198,23 +1190,7 @@ ssl_certs(){
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$lsb_dist" = "debian" ] && [ "$dist_version" = "8" ]; then
|
if [ "$lsb_dist" = "debian" ] || [ "$lsb_dist" = "ubuntu" ]; then
|
||||||
if [ "$installoption" = "1" ]; then
|
|
||||||
if [ "$webserver" = "1" ]; then
|
|
||||||
(crontab -l ; echo '0 0,12 * * * ./certbot-auto renew --pre-hook "service nginx stop" --post-hook "service nginx restart" >> /dev/null 2>&1')| crontab -
|
|
||||||
elif [ "$webserver" = "2" ]; then
|
|
||||||
(crontab -l ; echo '0 0,12 * * * ./certbot-auto renew --pre-hook "service apache2 stop" --post-hook "service apache2 restart" >> /dev/null 2>&1')| crontab -
|
|
||||||
fi
|
|
||||||
elif [ "$installoption" = "2" ]; then
|
|
||||||
(crontab -l ; echo '0 0,12 * * * ./certbot-auto 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" = "3" ]; then
|
|
||||||
if [ "$webserver" = "1" ]; then
|
|
||||||
(crontab -l ; echo '0 0,12 * * * ./certbot-auto 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-auto 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
|
|
||||||
elif [ "$lsb_dist" = "debian" ] || [ "$lsb_dist" = "ubuntu" ]; then
|
|
||||||
if [ "$installoption" = "1" ]; then
|
if [ "$installoption" = "1" ]; then
|
||||||
if [ "$webserver" = "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 -
|
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "service nginx stop" --post-hook "service nginx restart" >> /dev/null 2>&1')| crontab -
|
||||||
|
Loading…
Reference in New Issue
Block a user