mirror of
				https://git.koehlerweb.org/frodovdr/guac-install
				synced 2025-10-31 10:36:40 +01:00 
			
		
		
		
	| @@ -2,6 +2,7 @@ | |||||||
|  |  | ||||||
| # Try to get database from /etc/guacamole/guacamole.properties | # Try to get database from /etc/guacamole/guacamole.properties | ||||||
| DATABASE=$(grep -oP 'mysql-database:\K.*' /etc/guacamole/guacamole.properties | awk '{print $1}') | DATABASE=$(grep -oP 'mysql-database:\K.*' /etc/guacamole/guacamole.properties | awk '{print $1}') | ||||||
|  | MYSQL_SERVER=$(grep -oP ‘mysql-hostname:\K.*’ /etc/guacamole/guacamole.properties | awk ‘{print $1}’) | ||||||
|  |  | ||||||
| # Get MySQL root password | # Get MySQL root password | ||||||
| echo | echo | ||||||
| @@ -10,7 +11,7 @@ do | |||||||
|     read -s -p "Enter MySQL ROOT Password: " mysqlrootpassword |     read -s -p "Enter MySQL ROOT Password: " mysqlrootpassword | ||||||
|     export MYSQL_PWD=${mysqlrootpassword} |     export MYSQL_PWD=${mysqlrootpassword} | ||||||
|     echo |     echo | ||||||
|     mysql -u root ${DATABASE} -e"quit" && break |     mysql -u root -h ${MYSQL_SERVER} ${DATABASE} -e"quit" && break | ||||||
|     echo |     echo | ||||||
| done | done | ||||||
| echo | echo | ||||||
| @@ -81,7 +82,7 @@ do | |||||||
|     if [[ $(echo -e "${FILEVERSION}\n${OLDVERSION}" | sort -V | head -n1) == ${OLDVERSION} && ${FILEVERSION} != ${OLDVERSION} ]] |     if [[ $(echo -e "${FILEVERSION}\n${OLDVERSION}" | sort -V | head -n1) == ${OLDVERSION} && ${FILEVERSION} != ${OLDVERSION} ]] | ||||||
|     then |     then | ||||||
|         echo "Patching ${DATABASE} with ${FILE}" |         echo "Patching ${DATABASE} with ${FILE}" | ||||||
|         mysql -u root ${DATABASE} < guacamole-auth-jdbc-${GUACVERSION}/mysql/schema/upgrade/${FILE} |         mysql -u root -h ${MYSQL_SERVER} ${DATABASE} < guacamole-auth-jdbc-${GUACVERSION}/mysql/schema/upgrade/${FILE} | ||||||
|     fi |     fi | ||||||
| done | done | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user