From 911a18ab0c311741177c4585f78bc4218883cef4 Mon Sep 17 00:00:00 2001 From: Chase Wright Date: Fri, 21 Jul 2017 17:49:40 -0500 Subject: [PATCH] Add files via upload --- guac-install.sh | 10 ++++++---- guac-upgrade.sh | 9 +++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/guac-install.sh b/guac-install.sh index 77a9a0b..ff69e69 100644 --- a/guac-install.sh +++ b/guac-install.sh @@ -1,6 +1,8 @@ #!/bin/bash +# Version Numbers of Guacamole and MySQL Connection/J to download VERSION="0.9.12" +MCJVERSION = "5.1.43" # Grab a password for MySQL Root read -s -p "Enter the password that will be used for MySQL Root: " mysqlrootpassword @@ -34,12 +36,12 @@ echo "GUACAMOLE_HOME=/etc/guacamole" >> /etc/default/tomcat8 wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/source/guacamole-server-${VERSION}-incubating.tar.gz wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-${VERSION}-incubating.war wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-auth-jdbc-${VERSION}-incubating.tar.gz -wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.41.tar.gz +wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MCJVERSION}.tar.gz # Extract Guacamole Files tar -xzf guacamole-server-${VERSION}-incubating.tar.gz tar -xzf guacamole-auth-jdbc-${VERSION}-incubating.tar.gz -tar -xzf mysql-connector-java-5.1.41.tar.gz +tar -xzf mysql-connector-java-${MCJVERSION}.tar.gz # MAKE DIRECTORIES mkdir /etc/guacamole @@ -59,7 +61,7 @@ cd .. mv guacamole-${VERSION}-incubating.war /etc/guacamole/guacamole.war ln -s /etc/guacamole/guacamole.war /var/lib/tomcat8/webapps/ ln -s /usr/local/lib/freerdp/* /usr/lib/x86_64-linux-gnu/freerdp/. -cp mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar /etc/guacamole/lib/ +cp mysql-connector-java-${MCJVERSION}/mysql-connector-java-${MCJVERSION}-bin.jar /etc/guacamole/lib/ cp guacamole-auth-jdbc-${VERSION}-incubating/mysql/guacamole-auth-jdbc-mysql-${VERSION}-incubating.jar /etc/guacamole/extensions/ # Configure guacamole.properties @@ -91,4 +93,4 @@ cat guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/*.sql | mysql -u root # Cleanup rm -rf guacamole-* -rm -rf mysql-connector-java-5.1.41* +rm -rf mysql-connector-java-${MCJVERSION}* diff --git a/guac-upgrade.sh b/guac-upgrade.sh index 5d16275..621f0a3 100644 --- a/guac-upgrade.sh +++ b/guac-upgrade.sh @@ -1,4 +1,7 @@ +# Version Numbers of Guacamole and MySQL Connection/J to download VERSION="0.9.12" +MCJVERSION = "5.1.43" + SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")') # Stop Tomcat @@ -24,6 +27,12 @@ wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/binary/guacamole-auth-j tar -xzf guacamole-auth-jdbc-${VERSION}-incubating.tar.gz cp guacamole-auth-jdbc-${VERSION}-incubating/mysql/guacamole-auth-jdbc-mysql-${VERSION}-incubating.jar /etc/guacamole/extensions/ +# Upgrade the MySQL Connector-J +wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MCJVERSION}.tar.gz +tar -xzf mysql-connector-java-${MCJVERSION}.tar.gz +cp mysql-connector-java-${MCJVERSION}/mysql-connector-java-${MCJVERSION}-bin.jar /etc/guacamole/lib/ +rm -rf mysql-connector-java-${MCJVERSION}* + # Check if there is an schema upgrade file, if there is run it (will prompt for password) if [ -f "guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/upgrade/upgrade-pre-${VERSION}.sql" ] then