protect config.php from mixup

This commit is contained in:
philippe lhardy
2025-07-30 08:46:55 +02:00
parent e09e225888
commit 570d105f6d

View File

@@ -77,8 +77,16 @@ fi
log_info 'Adjusting trusted_domains in ${bind_folder}/config/config.php'
# assumes a php is installed locally, could be changed to use a podman image or container
sudo cp ${bind_folder}/config/config.php .
php patch_config.php "$listen_host:$host_free_port" | sudo tee ${bind_folder}/config/config.php
config_php=${bind_folder}/config/config.php
if [[ -f $config_php ]]
then
sudo cp $config_php config.php
sudo chown $(id -u):$(id -g) config.php
php patch_config.php "$listen_host:$host_free_port" | sudo tee ${bind_folder}/config/config.php
else
log_info "no config/php, first install ?"
fi
log_info "run podman with args ${podman_args[@]}"