mirror of
https://github.com/MysticRyuujin/guac-install.git
synced 2023-10-10 13:36:56 +02:00
d07bfcb98b
* Support Upgrade From Older Versions First I've added a MySQL Root Password Prompt, it will verify that the user is entering the correct password and will not continue until the MySQL Root Password is entered correctly. Second, I'm just getting the tomcat version number from /etc/ folder name...This seems to work well enough (instead of making the user edit the script manually)...Maybe someone can come up with a better solution? Third, I'm using the Version.js file to get the currently installed versions number. This allows for supporting multiple version number upgrades (E.G going from 0.8.2 to 0.9.14). The script will now loop through all of the SQL Upgrade files, and apply any that are newer than the OLDVERSION... I.E. Going from 0.9.9 to 0.9.13 should automatically install `upgrade-pre-0.9.10.sql` & `upgrade-pre-0.9.11.sql` & `upgrade-pre-0.9.13.sql` * Remove GUACAMOLE_HOME According to the documentation this is now a default search path, so this isn't required anymore * Version Control for Ubuntu and Debian This might need more work but it should install the proper packages for both Ubuntu and Debian and account for Tomcat 8.0.x and 8.5.x differences... http://tomcat.apache.org/whichversion.html 7.x does not say end of life... but 8.0.x does. The distro maintainers have different versions of Tomcat8 so we can check for 8.5.x or newer options and install, otherwise go the safer route and install Tomcat7 * Remove rm and ln of tomcat/.guacamole According to the documentation this is not required (it may not have been required to begin with?) * No Longer Incubating!
72 lines
1.9 KiB
Bash
72 lines
1.9 KiB
Bash
#!/bin/bash
|
|
|
|
VERSION="0.9.14"
|
|
|
|
# Ubuntu and Debian have different names of the libjpeg-turbo library for some reason...
|
|
source /etc/lsb-release
|
|
|
|
if [ $DISTRIB_ID == "Ubuntu" ]
|
|
then
|
|
JPEGTURBO="libjpeg-turbo8-dev"
|
|
else
|
|
JPEGTURBO="libjpeg62-turbo-dev"
|
|
fi
|
|
|
|
# Ubuntu 16.10 has a different name for libpng12-dev for some reason...
|
|
if [ $DISTRIB_RELEASE == "16.10" ]
|
|
then
|
|
LIBPNG="libpng-dev"
|
|
else
|
|
LIBPNG="libpng12-dev"
|
|
fi
|
|
|
|
# Install Server Features
|
|
apt update
|
|
apt -y install build-essential libcairo2-dev ${JPEGTURBO} ${LIBPNG} libossp-uuid-dev libavcodec-dev libavutil-dev \
|
|
libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \
|
|
libvorbis-dev libwebp-dev jq curl wget
|
|
|
|
# If apt fails to run completely the rest of this isn't going to work...
|
|
if [ $? != 0 ]
|
|
then
|
|
echo "apt failed to install all required dependencies."
|
|
exit
|
|
fi
|
|
|
|
# Set SERVER to be the preferred download server from the Apache CDN
|
|
SERVER="http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${VERSION}-incubating"
|
|
|
|
# Download Guacamole Files
|
|
wget -O guacamole-server-${VERSION}-incubating.tar.gz ${SERVER}/source/guacamole-server-${VERSION}-incubating.tar.gz
|
|
if [ ! -f ./guacamole-server-${VERSION}-incubating.tar.gz ]; then
|
|
echo "Failed to download guacamole-server-${VERSION}-incubating.tar.gz"
|
|
echo "${SERVER}/source/guacamole-server-${VERSION}-incubating.tar.gz"
|
|
exit
|
|
fi
|
|
|
|
# Extract Guacamole Files
|
|
tar -xzf guacamole-server-${VERSION}-incubating.tar.gz
|
|
|
|
# Make Directories
|
|
mkdir /etc/guacamole
|
|
|
|
# Install guacd
|
|
cd guacamole-server-${VERSION}-incubating
|
|
./configure --with-init-dir=/etc/init.d
|
|
make
|
|
make install
|
|
ldconfig
|
|
cd ..
|
|
|
|
# Configure guacamole.properties
|
|
echo "[server]" >> /etc/guacamole/guacd.conf
|
|
echo "bind_host = 0.0.0.0" >> /etc/guacamole/guacd.conf
|
|
echo "bind_port = 4822" >> /etc/guacamole/guacd.conf
|
|
|
|
# Configure startup
|
|
systemctl enable guacd
|
|
systemctl start guacd
|
|
|
|
# Cleanup
|
|
rm -rf guacamole-*
|