mirror of
https://github.com/itiligent/Easy-Guacamole-Installer.git
synced 2025-12-15 02:35:49 +00:00
Add in some conditional command excecution
Adding in a variable test and an if else statement to preserve existing logic in case there is another reason for it
This commit is contained in:
parent
d580223174
commit
1218e622b2
1 changed files with 5 additions and 1 deletions
|
|
@ -231,7 +231,11 @@ if [[ "${INSTALL_MYSQL}" = true ]]; then
|
|||
FILEVERSION=$(echo ${FILE} | grep -oP 'upgrade-pre-\K[0-9\.]+(?=\.)')
|
||||
if [[ $(echo -e "${FILEVERSION}\n${OLD_GUAC_VERSION}" | sort -V | head -n1) == ${OLD_GUAC_VERSION} && ${FILEVERSION} != ${OLD_GUAC_VERSION} ]]; then
|
||||
echo "Patching ${GUAC_DB} with ${FILE}"
|
||||
mysql -u root -p${MYSQL_ROOT_PWD} -D ${GUAC_DB} -h ${MYSQL_HOST} -P ${MYSQL_PORT} <guacamole-auth-jdbc-${NEW_GUAC_VERSION}/mysql/schema/upgrade/${FILE} &>>${INSTALL_LOG}
|
||||
if [[ ! -z "$MYSQL_ROOT_PWD" ]]; then
|
||||
mysql -u root -p${MYSQL_ROOT_PWD} -D ${GUAC_DB} -h ${MYSQL_HOST} -P ${MYSQL_PORT} <guacamole-auth-jdbc-${NEW_GUAC_VERSION}/mysql/schema/upgrade/${FILE} &>>${INSTALL_LOG}
|
||||
else
|
||||
mysql -u root -D ${GUAC_DB} -h ${MYSQL_HOST} -P ${MYSQL_PORT} <guacamole-auth-jdbc-${NEW_GUAC_VERSION}/mysql/schema/upgrade/${FILE} &>>${INSTALL_LOG}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if [[ $? -ne 0 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue