From 2d7cb869c556d095ab03143869339ae2002684a3 Mon Sep 17 00:00:00 2001 From: downtownallday Date: Fri, 19 Jun 2020 12:02:15 -0400 Subject: [PATCH] Continue to make old ownCloud contacts available in Roundcube --- setup/mods.available/remote-nextcloud.sh | 27 +++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/setup/mods.available/remote-nextcloud.sh b/setup/mods.available/remote-nextcloud.sh index c09e2130..b50add94 100755 --- a/setup/mods.available/remote-nextcloud.sh +++ b/setup/mods.available/remote-nextcloud.sh @@ -35,12 +35,29 @@ configure_roundcube() { local name="${1:-$NC_HOST}" local baseurl="$NC_PROTO://$NC_HOST:$NC_PORT$NC_PREFIX" - # Configure CardDav - cat > ${RCM_PLUGIN_DIR}/carddav/config.inc.php <[ \t]*)true + # + sed -i 's/\(['"'"'"]active['"'"'"][ \t]*=>[ \t]*\)true/\1false/' ${RCM_PLUGIN_DIR}/carddav/config.inc.php + + # b. set 'readonly' to 'true' + # regular expressions is like above + sed -i 's/\(['"'"'"]readonly['"'"'"][ \t]*=>[ \t]*\)false/\1true/' ${RCM_PLUGIN_DIR}/carddav/config.inc.php + + # + # 2. add the remote Nextcloud + # + cat >> ${RCM_PLUGIN_DIR}/carddav/config.inc.php < '$name', 'username' => '%u', // login username