From 52145d2fc37a6279f50743ee7efcee0f62c5c8e9 Mon Sep 17 00:00:00 2001 From: ngn Date: Tue, 21 Jan 2025 14:36:00 +0300 Subject: [PATCH] prevent init script from breaking the image Signed-off-by: ngn --- docker/init.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docker/init.sh b/docker/init.sh index 3f50168..21926e8 100644 --- a/docker/init.sh +++ b/docker/init.sh @@ -1,8 +1,10 @@ #!/bin/sh set -e -php ./gen_config.php -rm ./gen_config.php +if [ ! -f '/var/www/html/4get/data/config.php' ] && [ -f './gen_config.php' ]; then + php ./gen_config.php + rm -f ./gen_config.php +fi echo "Starting up apache2" exec httpd -DFOREGROUND