diff --git a/README.md b/README.md index 23c464c..af69087 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # guac-install -Script for installing Guacamole 0.9.12 on Ubuntu 16.04 with MySQL +Script for installing Guacamole 0.9.12 on Ubuntu 16.04 with MySQL. Should also work on pure Debian. Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect the the Guacamole Database. diff --git a/guac-install-server.sh b/guac-install-server.sh index b7223d0..1a4556d 100644 --- a/guac-install-server.sh +++ b/guac-install-server.sh @@ -2,16 +2,24 @@ VERSION="0.9.12" +# 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 + # Install Server Features apt-get update -apt-get -y install build-essential libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev \ +apt-get -y install build-essential libcairo2-dev $JPEGTURBO libpng12-dev 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-Get fails to run completely the rest of this isn't going to work... if [ $? != 0 ] then - echo "apt-get failed to install all required dependencies. Are you on Ubuntu 16.04 LTS?" + echo "apt-get failed to install all required dependencies." exit fi diff --git a/guac-install.sh b/guac-install.sh index 8702de7..a2fac66 100644 --- a/guac-install.sh +++ b/guac-install.sh @@ -12,16 +12,24 @@ debconf-set-selections <<< "mysql-server mysql-server/root_password_again passwo # Grab a password for Guacamole Database User Account read -s -p "Enter the password that will be used for the Guacamole database: " guacdbuserpassword +# 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 + # Install Features apt-get update -apt-get -y install build-essential libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libavcodec-dev libavutil-dev \ +apt-get -y install build-essential libcairo2-dev $JPEGTURBO libpng12-dev 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 mysql-server mysql-client mysql-common mysql-utilities tomcat8 freerdp ghostscript jq wget curl # If Apt-Get fails to run completely the rest of this isn't going to work... if [ $? != 0 ] then - echo "apt-get failed to install all required dependencies. Are you on Ubuntu 16.04 LTS?" + echo "apt-get failed to install all required dependencies. exit fi