Skip to content

Commit

Permalink
Re-fix issue #16
Browse files Browse the repository at this point in the history
  • Loading branch information
abesnier committed Jun 14, 2023
1 parent d1dad85 commit f1b35a7
Show file tree
Hide file tree
Showing 7 changed files with 62 additions and 45 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Ubuntu | guacamole:1.5.2 <br> guacamole:latest | guacamole:1.5.2-pg14 <br> guaca
Alpine | N/A | guacamole:1.5.2-alpine | guacamole:1.5.2-alpine-pg15

# What's new / Changelog
**2023-06-14** - Ok, my previous fix for issue #16 did not work at all. Also, I noticed that if you enabled an extension and then tried to disable it, it would not work. That last bug went unoticed since I forked Oznu's image and started working on it!

**2023-06-12** - Updated to Tomcat 9.0.76

**2023-06-07** - :warning: It seems that Guacamole 1.5.2 [can segfault on some RDP connections](https://lists.apache.org/thread/ws7xykpm2cmnz2w42y9qy8kkn6hdpr0x). If you encounter that bug, please hold on for a bit until the Guacamole Team fixes it (and that will probably not take long).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/with-contenv sh

# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
echo "Cleaning Extensions from previous Guacamole versions"
for e in $(ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER}); do
rm ${GUACAMOLE_HOME}/extensions/${e}
done

# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
# clean up extensions
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
#done
echo "Cleaning Extensions"
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording-storage vault-ksm; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done

# this was from Oznu's image
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
Expand All @@ -16,6 +18,7 @@ ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
#fi

# enable extensions
echo "Enabling selected Extensions"
for i in $(echo "$EXTENSIONS" | tr "," " "); do
cp ${GUACAMOLE_HOME}/extensions-available/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions
done
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/with-contenv sh

# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
echo "Cleaning Extensions from previous Guacamole versions"
for e in $(ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER}); do
rm ${GUACAMOLE_HOME}/extensions/${e}
done

# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
# clean up extensions
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
#done
echo "Cleaning Extensions"
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording-storage vault-ksm; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done

# this was from Oznu's image
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
Expand All @@ -16,6 +18,7 @@ ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
#fi

# enable extensions
echo "Enabling selected Extensions"
for i in $(echo "$EXTENSIONS" | tr "," " "); do
cp ${GUACAMOLE_HOME}/extensions-available/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions
done
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/with-contenv sh

# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
echo "Cleaning Extensions from previous Guacamole versions"
for e in $(ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER}); do
rm ${GUACAMOLE_HOME}/extensions/${e}
done

# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
# clean up extensions
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
#done
echo "Cleaning Extensions"
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording-storage vault-ksm; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done

# this was from Oznu's image
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
Expand All @@ -16,6 +18,7 @@ ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
#fi

# enable extensions
echo "Enabling selected Extensions"
for i in $(echo "$EXTENSIONS" | tr "," " "); do
cp ${GUACAMOLE_HOME}/extensions-available/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions
done
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
#!/usr/bin/with-contenv sh

# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
echo "Cleaning Extensions from previous Guacamole versions"
for e in $(ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER}); do
rm ${GUACAMOLE_HOME}/extensions/${e}
done

# this creates an issue with auth-jdbc, that is a mandatory extension, does not exist in extensions-available, and is not removed when version is bumped
# clean up extensions
# for i in auth-ldap auth-duo auth-header auth-cas auth-openid auth-quickconnect auth-totp auth-saml auth-json branding; do
# rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
#done
echo "Cleaning Extensions"
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording-storage vault-ksm; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done

# this was from Oznu's image
# if the guacamole version was bumped, delete the contents of the extensions directory - just on the first run
Expand All @@ -16,6 +18,7 @@ ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER} | xargs rm -f
#fi

# enable extensions
echo "Enabling selected Extensions"
for i in $(echo "$EXTENSIONS" | tr "," " "); do
cp ${GUACAMOLE_HOME}/extensions-available/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions
done
21 changes: 0 additions & 21 deletions root_pg15/etc/cont-init.d/50-extensions

This file was deleted.

24 changes: 24 additions & 0 deletions root_pg15/etc/cont-init.d/50-extensions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/with-contenv sh

# this one should work better and is a one liner. However, all extensions must contain the correct guacamole version in their name
echo "Cleaning Extensions from previous Guacamole versions"
for e in $(ls -1 ${GUACAMOLE_HOME}/extensions | grep -v ${GUAC_VER}); do
rm ${GUACAMOLE_HOME}/extensions/${e}
done

echo "Cleaning Extensions"
for i in auth-duo auth-header auth-json auth-ldap auth-quickconnect auth-sso-cas auth-sso-openid auth-sso-saml auth-totp branding history-recording-storage vault-ksm; do
rm -rf ${GUACAMOLE_HOME}/extensions/guacamole-${i}-${GUAC_VER}.jar
done

# this was from Oznu's image
# 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
echo "Enabling selected Extensions"
for i in $(echo "$EXTENSIONS" | tr "," " "); do
cp ${GUACAMOLE_HOME}/extensions-available/guacamole-${i}-${GUAC_VER}.jar ${GUACAMOLE_HOME}/extensions
done

0 comments on commit f1b35a7

Please sign in to comment.