From 6857c1d220e6f1cb1241ee59cae3b8dc541e600a Mon Sep 17 00:00:00 2001 From: Marc Jegliewski Date: Mon, 13 Dec 2021 12:41:12 +0100 Subject: [PATCH] GUACAMOLE-1475: Make api-session-timeout setable in Docker via env var API_SESSION_TIMEOUT --- guacamole-docker/bin/start.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/guacamole-docker/bin/start.sh b/guacamole-docker/bin/start.sh index 062e16a06..3ef3b2cbc 100755 --- a/guacamole-docker/bin/start.sh +++ b/guacamole-docker/bin/start.sh @@ -710,6 +710,13 @@ associate_json() { ln -s /opt/guacamole/json/guacamole-auth-*.jar "$GUACAMOLE_EXT" } +## +## Adds api-session-timeout to guacamole.properties +## +associate_apisessiontimeout() { + set_optional_property "api-session-timeout" "$API_SESSION_TIMEOUT" +} + ## ## Starts Guacamole under Tomcat, replacing the current process with the ## Tomcat process. As the current process will be replaced, this MUST be the @@ -873,6 +880,11 @@ if [ -n "$JSON_SECRET_KEY" ]; then associate_json fi +# Use api-session-timeout if specified. +if [ -n "$API_SESSION_TIMEOUT" ]; then + associate_apisessiontimeout +fi + # Set logback level if specified if [ -n "$LOGBACK_LEVEL" ]; then unzip -o -j /opt/guacamole/guacamole.war WEB-INF/classes/logback.xml -d $GUACAMOLE_HOME