From 4dc0fee00a16ab1e1e53f9278b60fad17da7d069 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:45:53 -0600 Subject: [PATCH] Update apache-guacamole-install.sh --- apache-guacamole/apache-guacamole-install.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/apache-guacamole/apache-guacamole-install.sh b/apache-guacamole/apache-guacamole-install.sh index df27250..d946401 100644 --- a/apache-guacamole/apache-guacamole-install.sh +++ b/apache-guacamole/apache-guacamole-install.sh @@ -7,6 +7,7 @@ if ! [ $(id -u) = 0 ]; then exit 1 fi +APP_NAME="guacamole" MARIADB_VERSION="106" DB_PATH="/var/db/mysql" DATABASE="mariadb" @@ -18,7 +19,7 @@ DB_PASSWORD=$(openssl rand -base64 15) # Check for reinstall if [ "$(ls -A "${DB_PATH}")" ]; then echo "Existing Guacamole database detected. Checking compatability for reinstall." - if [ "$(ls -A "${DB_PATH}/${DATABASE}")" ]; then + if [ "$(ls -A "${DB_PATH}/${DB_NAME}")" ]; then echo "Database is compatible, continuing..." REINSTALL="true" else @@ -57,9 +58,9 @@ sed -i -e 's/'localhost'/'0.0.0.0'/g' /usr/local/etc/guacamole-server/guacd.conf # Add database connection echo "mysql-hostname: localhost" >> /usr/local/etc/guacamole-client/guacamole.properties echo "mysql-port: 3306" >> /usr/local/etc/guacamole-client/guacamole.properties -echo "mysql-database: '${DB_NAME}'" >> /usr/local/etc/guacamole-client/guacamole.properties -echo "mysql-username: '${DB_USER}'" >> /usr/local/etc/guacamole-client/guacamole.properties -echo "mysql-password: '${DB_PASSWORD}'" >> /usr/local/etc/guacamole-client/guacamole.properties +echo "mysql-database: ${DB_NAME}" >> /usr/local/etc/guacamole-client/guacamole.properties +echo "mysql-username: ${DB_USER}" >> /usr/local/etc/guacamole-client/guacamole.properties +echo "mysql-password: ${DB_PASSWORD}" >> /usr/local/etc/guacamole-client/guacamole.properties service mysql-server start if [ "${REINSTALL}" == "true" ]; then