From ef086a724ddc7f4e1f66539c2e517bd40596ee13 Mon Sep 17 00:00:00 2001 From: aptalca <541623+aptalca@users.noreply.github.com> Date: Mon, 9 Sep 2024 12:08:08 -0400 Subject: [PATCH] migrate config to v3 but leave old one in place just in case --- root/etc/s6-overlay/s6-rc.d/init-cops-config/run | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/root/etc/s6-overlay/s6-rc.d/init-cops-config/run b/root/etc/s6-overlay/s6-rc.d/init-cops-config/run index 0ba1e5c..f1c98e0 100755 --- a/root/etc/s6-overlay/s6-rc.d/init-cops-config/run +++ b/root/etc/s6-overlay/s6-rc.d/init-cops-config/run @@ -23,7 +23,13 @@ done # copy config if [[ ! -e /config/config/local.php ]]; then - cp /defaults/config/local.php /config/config/local.php + if [[ -e /config/config_local.php ]]; then + echo "**** Existing config found, migrating for v3. Please check the contents of /config/config/local.php which will be the active config in v3 ****" + cp /config/config_local.php /config/config/local.php + else + echo "**** New instance detected, generating default config at /config/config/local.php ****" + cp /defaults/config/local.php /config/config/local.php + fi fi # copy extra user-profiles