2017-04-05 18:33:25 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
VERSION="0.9.12"
|
|
|
|
|
2017-07-29 21:33:15 +02:00
|
|
|
# Ubuntu and Debian have different names of the libjpeg-turbo library for some reason...
|
|
|
|
if [ `egrep -c "ID=ubuntu" /etc/os-release` -gt 0 ]
|
|
|
|
then
|
|
|
|
JPEGTURBO="libjpeg-turbo8-dev"
|
|
|
|
else
|
|
|
|
JPEGTURBO="libjpeg62-turbo-dev"
|
|
|
|
fi
|
|
|
|
|
2017-04-05 18:33:25 +02:00
|
|
|
# Install Server Features
|
|
|
|
apt-get update
|
2017-07-29 21:33:15 +02:00
|
|
|
apt-get -y install build-essential libcairo2-dev $JPEGTURBO libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev \
|
2017-04-05 18:33:25 +02:00
|
|
|
libswscale-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev libvncserver-dev libpulse-dev libssl-dev \
|
2017-07-22 00:53:17 +02:00
|
|
|
libvorbis-dev libwebp-dev jq curl wget
|
2017-04-05 18:33:25 +02:00
|
|
|
|
|
|
|
# If Apt-Get fails to run completely the rest of this isn't going to work...
|
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
2017-07-29 21:33:15 +02:00
|
|
|
echo "apt-get failed to install all required dependencies."
|
2017-04-05 18:33:25 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
SERVER=$(curl -s 'https://www.apache.org/dyn/closer.cgi?as_json=1' | jq --raw-output '.preferred|rtrimstr("/")')
|
|
|
|
|
|
|
|
# Download Guacample Files
|
|
|
|
wget ${SERVER}/incubator/guacamole/${VERSION}-incubating/source/guacamole-server-${VERSION}-incubating.tar.gz
|
|
|
|
|
|
|
|
# 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-*
|