1
0
mirror of https://git.koehlerweb.org/frodovdr/guac-install synced 2025-07-06 16:13:34 +02:00

Fix for Debian Buster (#107)

* Fix for Debian Buster

Validated Installation with Debian Buster 10.3.0

* Update README.md
This commit is contained in:
Chase Wright
2020-02-17 12:56:15 -08:00
committed by GitHub
parent 7a059134da
commit a312feb0b1
2 changed files with 26 additions and 23 deletions

View File

@ -24,17 +24,15 @@ LOG="/tmp/guacamole_${GUACVERSION}_build.log"
# Initialize variable values
installTOTP=""
installDuo=""
installMySQL=""
mysqlHost=""
mysqlPort=""
mysqlRootPwd=""
guacDb=""
guacUser=""
guacPwd=""
PROMPT=""
MYSQL=""
# Get script arguments for non-interactive mode
while [ "$1" != "" ]; do
@ -97,6 +95,7 @@ if [[ -z $installTOTP ]] && [[ -z $installDuo ]]; then
read PROMPT
if [[ $PROMPT =~ ^[Yy]$ ]]; then
installTOTP=true
installDuo=false
else
installTOTP=false
fi
@ -108,6 +107,7 @@ if [[ -z $installDuo ]] && [[ -z $installTOTP ]]; then
read PROMPT
if [[ $PROMPT =~ ^[Yy]$ ]]; then
installDuo=true
installTOTP=false
else
installDuo=false
fi
@ -197,6 +197,11 @@ if [[ "${NAME}" == "Ubuntu" ]]; then
else
LIBPNG="libpng-dev"
fi
if [ "$installMySQL" = true ]; then
MYSQL="mysql-server mysql-client mysql-common mysql-utilities"
else
MYSQL="mysql-client"
fi
elif [[ "${NAME}" == *"Debian"* ]] || [[ "${NAME}" == *"Raspbian GNU/Linux"* ]]; then
JPEGTURBO="libjpeg62-turbo-dev"
if [[ "${PRETTY_NAME}" == *"stretch"* ]] || [[ "${PRETTY_NAME}" == *"buster"* ]]; then
@ -204,6 +209,11 @@ elif [[ "${NAME}" == *"Debian"* ]] || [[ "${NAME}" == *"Raspbian GNU/Linux"* ]];
else
LIBPNG="libpng12-dev"
fi
if [ "$installMySQL" = true ]; then
MYSQL="default-mysql-server default-mysql-client mysql-common"
else
MYSQL="default-mysql-client"
fi
else
echo "Unsupported Distro - Ubuntu, Debian, or Raspbian Only"
exit 1
@ -232,15 +242,6 @@ else
TOMCAT="tomcat7"
fi
MYSQL=""
if [ "$installMySQL" = true ]; then
if [ -z $(command -v mysql) ]; then
MYSQL="mysql-server mysql-client mysql-common mysql-utilities"
fi
else
MYSQL="mysql-client"
fi
# Uncomment to manually force a tomcat version
#TOMCAT=""
@ -271,6 +272,8 @@ if [ $? -ne 0 ]; then
echo -e "${RED}Failed to download guacamole-server-${GUACVERSION}.tar.gz"
echo -e "${SERVER}/source/guacamole-server-${GUACVERSION}.tar.gz${NC}"
exit 1
else
tar -xzf guacamole-server-${GUACVERSION}.tar.gz
fi
echo -e "${GREEN}Downloaded guacamole-server-${GUACVERSION}.tar.gz${NC}"
@ -289,6 +292,8 @@ if [ $? -ne 0 ]; then
echo -e "${RED}Failed to download guacamole-auth-jdbc-${GUACVERSION}.tar.gz"
echo -e "${SERVER}/binary/guacamole-auth-jdbc-${GUACVERSION}.tar.gz"
exit 1
else
tar -xzf guacamole-auth-jdbc-${GUACVERSION}.tar.gz
fi
echo -e "${GREEN}Downloaded guacamole-auth-jdbc-${GUACVERSION}.tar.gz${NC}"
@ -301,9 +306,10 @@ if [ "$installTOTP" = true ]; then
echo -e "${RED}Failed to download guacamole-auth-totp-${GUACVERSION}.tar.gz"
echo -e "${SERVER}/binary/guacamole-auth-totp-${GUACVERSION}.tar.gz"
exit 1
else
tar -xzf guacamole-auth-totp-${GUACVERSION}.tar.gz
fi
echo -e "${GREEN}Downloaded guacamole-auth-totp-${GUACVERSION}.tar.gz${NC}"
tar -xzf guacamole-auth-totp-${GUACVERSION}.tar.gz
fi
# Duo
@ -313,9 +319,10 @@ if [ "$installDuo" = true ]; then
echo -e "${RED}Failed to download guacamole-auth-duo-${GUACVERSION}.tar.gz"
echo -e "${SERVER}/binary/guacamole-auth-duo-${GUACVERSION}.tar.gz"
exit 1
else
tar -xzf guacamole-auth-duo-${GUACVERSION}.tar.gz
fi
echo -e "${GREEN}Downloaded guacamole-auth-duo-${GUACVERSION}.tar.gz${NC}"
tar -xzf guacamole-auth-duo-${GUACVERSION}.tar.gz
fi
# Deal with Missing MySQL Connector/J
@ -326,17 +333,14 @@ if [[ -z $JAVALIB ]]; then
echo -e "${RED}Failed to download mysql-connector-java-${MCJVER}.tar.gz"
echo -e "https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-${MCJVER}.tar.gz${NC}"
exit 1
else
tar -xzf mysql-connector-java-${MCJVER}.tar.gz
fi
echo -e "${GREEN}Downloaded mysql-connector-java-${MCJVER}.tar.gz${NC}"
tar -xzf mysql-connector-java-${MCJVER}.tar.gz
fi
echo -e "${GREEN}Downloading complete.${NC}"
# Extract Guacamole files
tar -xzf guacamole-server-${GUACVERSION}.tar.gz
tar -xzf guacamole-auth-jdbc-${GUACVERSION}.tar.gz
# Make directories
mkdir -p /etc/guacamole/lib
mkdir -p /etc/guacamole/extensions