From 18e4ecb5a4c89b776d0523a9004afd85f447baa6 Mon Sep 17 00:00:00 2001 From: oznu Date: Mon, 21 Jan 2019 20:00:01 +1100 Subject: [PATCH] only remove the extensions folder contents after a guac update --- root/etc/cont-init.d/50-extensions | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/root/etc/cont-init.d/50-extensions b/root/etc/cont-init.d/50-extensions index 1d21e5d..c5ec114 100644 --- a/root/etc/cont-init.d/50-extensions +++ b/root/etc/cont-init.d/50-extensions @@ -5,9 +5,10 @@ for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect a rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar done -# clean up old extentions -cd ${GUACAMOLE_HOME}/extensions/ -ls | grep -v ${GUAC_VER} | xargs rm +# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run +if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then + rm -rf ${GUACAMOLE_HOME}/extensions/* +fi # enable extensions for i in $(echo "$EXTENSIONS" | tr "," " "); do