mirror of
https://github.com/tommytran732/Pterodactyl-Script
synced 2024-11-22 10:31:34 -05:00
Update
This commit is contained in:
parent
40570e60bd
commit
0fd5bfc383
27
install.sh
27
install.sh
@ -315,8 +315,7 @@ install_dependencies(){
|
||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||
systemctl enable redis-server
|
||||
service redis-server start
|
||||
systemctl enable php8.0-fpm
|
||||
service php8.0-fpm start
|
||||
systemctl enable --now php8.0-fpm
|
||||
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ]; then
|
||||
systemctl enable --now redis
|
||||
systemctl enable --now php-fpm
|
||||
@ -689,8 +688,8 @@ install_wings() {
|
||||
|
||||
output "Installing Docker"
|
||||
if [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ]; then
|
||||
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
|
||||
dnf -y install docker-ce
|
||||
dnf install podman-docker
|
||||
systemctl enable --now podman.socket
|
||||
else
|
||||
curl -sSL https://get.docker.com/ | CHANNEL=stable bash
|
||||
fi
|
||||
@ -784,7 +783,7 @@ ssl_certs(){
|
||||
if [ "$lsb_dist" = "ubuntu" ] || [ "$lsb_dist" = "debian" ]; then
|
||||
apt-get -y install certbot
|
||||
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ] || [ "$lsb_dist" = "rocky" ]; then
|
||||
yum -y install certbot
|
||||
dnf -y install certbot
|
||||
fi
|
||||
service nginx stop
|
||||
certbot certonly --standalone --email "$email" --agree-tos -d "$FQDN" --non-interactive
|
||||
@ -799,24 +798,6 @@ ssl_certs(){
|
||||
else
|
||||
service nginx restart
|
||||
fi
|
||||
|
||||
if [ "$lsb_dist" = "debian" ] || [ "$lsb_dist" = "ubuntu" ]; then
|
||||
if [ "$installoption" = "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 -
|
||||
elif [ "$installoption" = "2" ]; 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 -
|
||||
elif [ "$installoption" = "3" ]; 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 -
|
||||
fi
|
||||
elif [ "$lsb_dist" = "fedora" ] || [ "$lsb_dist" = "centos" ] || [ "$lsb_dist" = "rhel" ]; then
|
||||
if [ "$installoption" = "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 -
|
||||
elif [ "$installoption" = "2" ]; then
|
||||
(crontab -l ; echo '0 0,12 * * * certbot renew --pre-hook "firewall-cmd --add-port=80/tcp && firewall-cmd --reload" --pre-hook "service wings stop" --post-hook "firewall-cmd --remove-port=80/tcp && firewall-cmd --reload" --post-hook "service wings restart" >> /dev/null 2>&1')| crontab -
|
||||
elif [ "$installoption" = "3" ]; 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 -
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
firewall(){
|
||||
|
Loading…
Reference in New Issue
Block a user