From 1a71abb191aa1521be92c0427476555bb359e5dc Mon Sep 17 00:00:00 2001 From: Chase Wright Date: Sat, 11 Nov 2017 10:03:42 -0600 Subject: [PATCH] Reorder and Comment --- guac-install.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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/