only remove the extensions folder contents after a guac update

This commit is contained in:
oznu
2019-01-21 20:00:01 +11:00
parent d029307b33
commit 18e4ecb5a4
+4 -3
View File
@@ -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 rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done done
# clean up old extentions # if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
cd ${GUACAMOLE_HOME}/extensions/ if [ "$(cat /config/.database-version)" != "$GUAC_VER" ]; then
ls | grep -v ${GUAC_VER} | xargs rm rm -rf ${GUACAMOLE_HOME}/extensions/*
fi
# enable extensions # enable extensions
for i in $(echo "$EXTENSIONS" | tr "," " "); do for i in $(echo "$EXTENSIONS" | tr "," " "); do