diff --git a/guac-install.sh b/guac-install.sh index 453c934..c8f0b06 100644 --- a/guac-install.sh +++ b/guac-install.sh @@ -56,16 +56,14 @@ if [ $? != 0 ]; then exit fi -# Get build-folder -BUILD_FOLDER=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")') - # Add GUACAMOLE_HOME to $TOMCAT ENV echo "" >> /etc/default/${TOMCAT} echo "# GUACAMOLE ENV VARIABLE" >> /etc/default/${TOMCAT} echo "GUACAMOLE_HOME=/etc/guacamole" >> /etc/default/${TOMCAT} +# Set SERVER to be the preferred download server from the Apache CDN +SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")') + # Download Guacamole files wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/source/guacamole-server-${VERSION}-incubating.tar.gz wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-${VERSION}-incubating.war @@ -90,6 +88,9 @@ ldconfig systemctl enable guacd cd .. +# Get build-folder +BUILD_FOLDER=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) + # Move files to correct locations mv guacamole-${VERSION}-incubating.war /etc/guacamole/guacamole.war ln -s /etc/guacamole/guacamole.war /var/lib/${TOMCAT}/webapps/