From 2bc513f4fc638412d7562508f2e27693bf7f3f3b Mon Sep 17 00:00:00 2001 From: Felix Bartels <1257835+fbartels@users.noreply.github.com> Date: Tue, 22 Sep 2020 08:58:03 +0200 Subject: [PATCH] match incl closing tags to prevent confusing PLUGIN_MDM_SERVER_SSL with PLUGIN_MDM_SERVER (#449) Fixes https://github.com/zokradonh/kopano-docker/issues/446 Signed-off-by: Felix Bartels --- examples/webapp.yml | 1 + php/start-helper.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/webapp.yml b/examples/webapp.yml index 606f086..bbcf06e 100644 --- a/examples/webapp.yml +++ b/examples/webapp.yml @@ -48,6 +48,7 @@ services: #- ADDITIONAL_KOPANO_WEBAPP_PLUGINS=kopano-webapp-plugin-mdm - KCCONF_WEBAPPPLUGIN_MDM_PLUGIN_MDM_USER_DEFAULT_ENABLE_MDM=true - KCCONF_WEBAPPPLUGIN_MDM_PLUGIN_MDM_SERVER=kopano_zpush:9080 + - KCCONF_WEBAPPPLUGIN_MDM_PLUGIN_MDM_SERVER_SSL=false networks: - web-net diff --git a/php/start-helper.sh b/php/start-helper.sh index af55ee1..93ea89b 100755 --- a/php/start-helper.sh +++ b/php/start-helper.sh @@ -13,12 +13,12 @@ php_cfg_gen() { return fi case $cfg_value in - # TODO stop after the first match + # TODO stop after the first match (currently matching incl. closing quote) true|TRUE|false|FALSE) - sed -ri "s#(\s*define).+${cfg_setting}.+#\tdefine(\x27${cfg_setting}\x27, ${cfg_value}\);#g" "$cfg_file" + sed -ri "s#(\s*define).+${cfg_setting}\x27.+#\tdefine(\x27${cfg_setting}\x27, ${cfg_value}\);#g" "$cfg_file" ;; *) - sed -ri "s#(\s*define).+${cfg_setting}.+#\tdefine(\x27${cfg_setting}\x27, \x27${cfg_value}\x27\);#g" "$cfg_file" + sed -ri "s#(\s*define).+${cfg_setting}\x27.+#\tdefine(\x27${cfg_setting}\x27, \x27${cfg_value}\x27\);#g" "$cfg_file" ;; esac else