Temporarily stop Caddy to free port 80 for certification

This commit is contained in:
Whispering Wind
2025-02-09 00:31:32 +03:30
committed by GitHub
parent a8ac9b02c5
commit 99935d99b6
2 changed files with 4 additions and 0 deletions

View File

@ -54,6 +54,7 @@ start_service() {
fi
# install_dependencies
systemctl stop caddy.service > /dev/null 2>&1
echo "Generating SSL certificates for $domain..."
certbot certonly --standalone --agree-tos --register-unsafely-without-email -d "$domain"
@ -69,6 +70,7 @@ start_service() {
systemctl daemon-reload
systemctl enable hysteria-normal-sub.service > /dev/null 2>&1
systemctl start hysteria-normal-sub.service > /dev/null 2>&1
systemctl restart caddy.service > /dev/null 2>&1
systemctl daemon-reload > /dev/null 2>&1
if systemctl is-active --quiet hysteria-normal-sub.service; then