1
0
mirror of https://git.koehlerweb.org/frodovdr/guac-install synced 2025-07-06 17:03:32 +02:00

Improve stability (#116)

I don't have time to test all of this lol but it appears to be in order...and much appreciated.
This commit is contained in:
Chase Wright
2020-03-04 13:24:53 -06:00
committed by GitHub
parent 4be76a7777
commit 4ce4410dec
3 changed files with 161 additions and 96 deletions

View File

@ -1,5 +1,8 @@
#!/bin/bash
# Check if user is root or sudo
if ! [ $(id -u) = 0 ]; then echo "Please run this script as sudo or root"; exit 1 ; fi
# Version number of Guacamole to install
GUACVERSION="1.1.0"
@ -23,7 +26,7 @@ if [ -n "$mysqlpwd" ] && [ -n "$guacpwd" ]; then
mysqlrootpassword=$mysqlpwd
guacdbuserpassword=$guacpwd
else
echo
echo
while true
do
read -s -p "Enter a MySQL ROOT Password: " mysqlrootpassword
@ -48,7 +51,7 @@ else
echo
fi
#Install Stuff
# Install Stuff
apt-get update
apt-get -y install docker-ce mysql-client wget
@ -75,9 +78,9 @@ sleep 30
# Create the Guacamole database and the user account
# SQL Code
SQLCODE="
create database guacamole_db;
create user 'guacamole_user'@'%' identified by '$guacdbuserpassword';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'%';
create database guacamole_db;
create user 'guacamole_user'@'%' identified by '$guacdbuserpassword';
GRANT SELECT,INSERT,UPDATE,DELETE ON guacamole_db.* TO 'guacamole_user'@'%';
flush privileges;"
# Execute SQL Code