Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions guac-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,39 @@ for file in /etc/guacamole/extensions/guacamole-auth-duo*.jar; do
fi
done

function download_sso_auth () {
wget -q --show-progress -O guacamole-auth-sso-${GUACVERSION}.tar.gz ${SERVER}/binary/guacamole-auth-sso-${GUACVERSION}.tar.gz
if [ $? -ne 0 ]; then
echo -e "${RED}Failed to download guacamole-auth-sso-${GUACVERSION}.tar.gz"
echo -e "${SERVER}/binary/guacamole-auth-sso-${GUACVERSION}.tar.gz"
exit 1
fi
echo -e "${GREEN}Downloaded guacamole-auth-sso-${GUACVERSION}.tar.gz${NC}"
tar -xzf guacamole-auth-sso-${GUACVERSION}.tar.gz
cp guacamole-auth-sso-${GUACVERSION}/saml/guacamole-auth-sso-saml-${GUACVERSION}.jar /etc/guacamole/extensions/
echo -e "${GREEN}SAML copied to extensions.${NC}"
break
}

# Handle upgrading SAML plugin if present
for file in /etc/guacamole/extensions/guacamole-auth-saml*.jar; do
if [[ -f $file ]]; then
# Upgrade SAML
echo -e "${BLUE}SAML extension was found, upgrading...${NC}"
rm /etc/guacamole/extensions/guacamole-auth-saml*.jar
download_sso_auth
fi
done
# Handle newer install/upgrade with different package name
for file in /etc/guacamole/extensions/guacamole-auth-sso-saml*.jar; do
if [[ -f $file ]]; then
# Upgrade SAML
echo -e "${BLUE}SAML extension was found, upgrading...${NC}"
rm /etc/guacamole/extensions/guacamole-auth-sso-saml*.jar
download_sso_auth
fi
done

# Fix for #196
mkdir -p /usr/sbin/.config/freerdp
chown daemon:daemon /usr/sbin/.config/freerdp
Expand Down