From c5a88e706c6f313f3c0e1b4549d7dc514107e38a Mon Sep 17 00:00:00 2001 From: Alex <40072887+alexdcrane@users.noreply.github.com> Date: Mon, 3 Aug 2026 18:52:42 +0000 Subject: [PATCH] Stop and disable Apache service if active --- debian/resources/nginx.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/resources/nginx.sh b/debian/resources/nginx.sh index dc0a236..5a613cc 100755 --- a/debian/resources/nginx.sh +++ b/debian/resources/nginx.sh @@ -95,6 +95,15 @@ if [ .$letsencrypt_folder = .true ]; then mkdir -p /var/www/letsencrypt/ fi +# Ensure apache2 is stopped and cannot start +if systemctl is-active --quiet apache2; then + verbose "Stopping Apache to clear port 80/443..." + systemctl stop apache2 +fi + +# Prevent apache from starting at boot +systemctl disable apache2 + #flush systemd cache systemctl daemon-reload