1
0
mirror of https://github.com/MysticRyuujin/guac-install.git synced 2023-10-10 13:36:56 +02:00

automated schema upgrade check

If the schema upgrade needs to happen then the file name would exist with the current version's name so it's easy enough to check for and run if necessary.
This commit is contained in:
Chase Wright 2017-07-17 18:05:08 -05:00 committed by GitHub
parent 8e8b6056dc
commit 34c8f44543

View File

@ -24,8 +24,11 @@ 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/
# Commented out this lines as there is no schema upgrade from 0.9.11 to 0.9.12
# mysql -u root -p guacamole_db < guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/upgrade/upgrade-pre-${VERSION}.sql
# 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
mysql -u root -p guacamole_db < guacamole-auth-jdbc-${VERSION}-incubating/mysql/schema/upgrade/upgrade-pre-${VERSION}.sql
fi
# Start Tomcat
service tomcat8 start