Update entrypoint.sh

This commit is contained in:
Stefan Pejcic 2024-07-24 22:20:22 +02:00 committed by GitHub
parent 90f38213e9
commit 385e9d832a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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