1
0
mirror of https://git.koehlerweb.org/frodovdr/guac-install synced 2024-11-14 22:47:14 +01:00

Add files via upload

This commit is contained in:
Chase Wright 2017-07-21 17:49:40 -05:00 committed by GitHub
parent 4727b3a917
commit 911a18ab0c
2 changed files with 15 additions and 4 deletions

View File

@ -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}*

View File

@ -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