diff --git a/guac-upgrade.sh b/guac-upgrade.sh index a747801..5d16275 100644 --- a/guac-upgrade.sh +++ b/guac-upgrade.sh @@ -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