1
0
mirror of https://github.com/MysticRyuujin/guac-install.git synced 2023-10-10 13:36:56 +02:00
guac-install/guac-install-server.sh

67 lines
1.7 KiB
Bash
Raw Normal View History

#!/bin/bash
VERSION="0.9.13"
# Ubuntu and Debian have different names of the libjpeg-turbo library for some reason...
2017-11-12 18:13:45 +01:00
source /etc/lsb-release
if [ $DISTRIB_ID == "Ubuntu" ]
then
JPEGTURBO="libjpeg-turbo8-dev"
else
JPEGTURBO="libjpeg62-turbo-dev"
fi
2017-11-12 18:13:45 +01:00
# 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
2017-08-22 04:48:58 +02:00
apt update
2017-11-12 18:13:45 +01:00
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 \
2017-07-22 00:53:17 +02:00
libvorbis-dev libwebp-dev jq curl wget
2017-08-22 04:48:58 +02:00
# If apt fails to run completely the rest of this isn't going to work...
if [ $? != 0 ]
then
2017-08-22 04:48:58 +02:00
echo "apt failed to install all required dependencies."
exit
fi
2017-11-12 18:13:45 +01:00
# Set SERVER to be the preferred download server from the Apache CDN
2017-12-01 18:43:20 +01:00
SERVER="http://apache.org/dyn/closer.cgi?action=download&filename=guacamole/${VERSION}-incubating"
2017-08-22 04:48:58 +02:00
# Download Guacamole Files
2017-12-01 18:43:20 +01:00
wget -O guacamole-server-${VERSION}-incubating.tar.gz ${SERVER}/source/guacamole-server-${VERSION}-incubating.tar.gz
# Extract Guacamole Files
tar -xzf guacamole-server-${VERSION}-incubating.tar.gz
2017-08-22 04:50:24 +02:00
# Make Directories
mkdir /etc/guacamole
2017-08-22 04:48:58 +02:00
# 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-*