From 8f1b634c351d2cde86da8bc478b840062050c066 Mon Sep 17 00:00:00 2001 From: Felix Bartels <1257835+fbartels@users.noreply.github.com> Date: Thu, 5 Dec 2019 12:44:32 +0100 Subject: [PATCH] Make app grid more finely grained configurable Add option to configure Kopano Meet and Konnect If all options are disabled kpop will default to its behaviour in showing all apps --- meet/start-service.sh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/meet/start-service.sh b/meet/start-service.sh index 6959285..027bb92 100755 --- a/meet/start-service.sh +++ b/meet/start-service.sh @@ -34,13 +34,21 @@ for setting in $(compgen -A variable KCCONF_MEET); do esac done +# Populate app grid +# Note: if below variables are set to "no" kpop will fall back to its default behaviour and show all known apps. # enable Kopano Konnect in the app grid -jq '.apps += {"enabled": ["kopano-konnect"]}' $CONFIG_JSON | sponge $CONFIG_JSON +if [ "${GRID_KONNECT:-yes}" = "yes" ]; then + jq '.apps.enabled += ["kopano-konnect"]' $CONFIG_JSON | sponge $CONFIG_JSON +fi -# enable Kopano WebApp in the app grid (enabled by default) -# TODO how to only update the array? +# enable Kopano Meet in the app grid +if [ "${GRID_MEET:-yes}" = "yes" ]; then + jq '.apps.enabled += ["kopano-meet"]' $CONFIG_JSON | sponge $CONFIG_JSON +fi + +# enable Kopano WebApp in the app grid if [ "${GRID_WEBAPP:-yes}" = "yes" ]; then - jq '.apps += {"enabled": ["kopano-webapp", "kopano-konnect"]}' $CONFIG_JSON | sponge $CONFIG_JSON + jq '.apps.enabled += ["kopano-webapp"]' $CONFIG_JSON | sponge $CONFIG_JSON fi sed -i s/\ *=\ */=/g /etc/kopano/kwebd.cfg