From 61667308d283823e8e29adc2b2fb6d2e556c072b Mon Sep 17 00:00:00 2001 From: Matthijs Date: Sat, 9 Mar 2024 17:31:15 +0100 Subject: [PATCH] Fixed escaping --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 948e8f1..ea1c7a2 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -64,8 +64,8 @@ unset rt # Change Apache port if needed from the default 80 to `WEBSERVER_PORT` (to run unprivileged or with a host network where no port mapping is available) if [[ -n "$WEBSERVER_PORT" ]]; then - sed -i "s/Listen 80/Listen \$WEBSERVER_PORT/" /etc/apache2/ports.conf - sed -i "s/VirtualHost *:80/VirtualHost *:\$WEBSERVER_PORT/" /etc/apache2/sites-enabled/000-default.conf + sed -i 's/Listen 80/Listen '"$WEBSERVER_PORT"'/' /etc/apache2/ports.conf + sed -i 's/VirtualHost *:80/VirtualHost *:'"$WEBSERVER_PORT"'/' /etc/apache2/sites-enabled/000-default.conf fi # Only restart if one of the enmod commands succeeded