From 385e9d832a8903a8deb0b13410a1760cac3cc65b Mon Sep 17 00:00:00 2001 From: Stefan Pejcic Date: Wed, 24 Jul 2024 22:20:22 +0200 Subject: [PATCH] Update entrypoint.sh --- docker/apache/entrypoint.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/docker/apache/entrypoint.sh b/docker/apache/entrypoint.sh index e5ae5f86..4616e3d5 100644 --- a/docker/apache/entrypoint.sh +++ b/docker/apache/entrypoint.sh @@ -116,16 +116,13 @@ chmod 700 /etc/apache2/sites-enabled sites_available_dir="/etc/apache2/sites-available" -if [ "$(grep 'OLD_IP="tst"' /etc/entrypoint.sh)" ]; then - echo "Apache is not started, since there are no websites yet." -else - # if there are any sites, start the service - if [ "$(ls -A $sites_available_dir | grep -v 'default')" ]; then + +# if there are any sites, start the service +if [ "$(ls -A $sites_available_dir | grep -v 'default')" ]; then service apache2 start echo "Apache service started." - else +else echo "No websites found in $sites_available_dir. Apache service not started automatically." - fi fi