Add Kali Linux Support (#115)

* Add Kali Linux support

* Restart MySQL service

Kali linux has it disabled by default

* Force the symlink
This commit is contained in:
g0tmi1k 2020-03-04 13:42:01 +00:00 committed by GitHub
parent 638ab0483c
commit 4be76a7777
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 4 deletions

View File

@ -2,7 +2,7 @@
# guac-install # guac-install
Script for installing Guacamole 1.1.0 on Ubuntu 16.04 or newer (with MySQL, or remote MySQL). It should also work on pure Debian or Raspbian. I have tested this with Debian 10.3.0 (Buster). **If other versions don't work please open an issue.** It is likely due to a required library having a different name. Script for installing Guacamole 1.1.0 on Ubuntu 16.04 or newer (with MySQL, or remote MySQL). It should also work on pure [Debian](https://www.debian.org/), [Raspbian](https://www.raspberrypi.org/downloads/raspbian/) or [Kali Linux](https://www.kali.org/). I have tested this with Debian 10.3.0 (Buster). **If other versions don't work please open an issue.** It is likely due to a required library having a different name.
Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect to the Guacamole Database. Run script, enter MySQL Root Password and Guacamole User password. Guacamole User is used to connect to the Guacamole Database.
@ -42,6 +42,7 @@ Once installation is done you can access Guacamole by browsing to: http://<host_
The default credentials are guacadmin as both username and password. Please change them or disable guacadmin after install! The default credentials are guacadmin as both username and password. Please change them or disable guacadmin after install!
# guac-upgrade # guac-upgrade
Script for upgrading currently installed Guacamole instance (previously installed via this script/guide). This will also now update the TOTP or Duo extensions if used. Script for upgrading currently installed Guacamole instance (previously installed via this script/guide). This will also now update the TOTP or Duo extensions if used.
If looks for the tomcat folder in /etc/ (E.G. `/etc/tomcat7` or `/etc/tomcat8`) hopefully that works to identify the correct tomcat version/path :smile: I'm open to suggestions/pull requests for a cleaner method. If looks for the tomcat folder in /etc/ (E.G. `/etc/tomcat7` or `/etc/tomcat8`) hopefully that works to identify the correct tomcat version/path :smile: I'm open to suggestions/pull requests for a cleaner method.

18
guac-install.sh Normal file → Executable file
View File

@ -205,9 +205,9 @@ if [[ "${NAME}" == "Ubuntu" ]]; then
else else
MYSQL="mysql-client" MYSQL="mysql-client"
fi fi
elif [[ "${NAME}" == *"Debian"* ]] || [[ "${NAME}" == *"Raspbian GNU/Linux"* ]]; then elif [[ "${NAME}" == *"Debian"* ]] || [[ "${NAME}" == *"Raspbian GNU/Linux"* ]] || [[ "${NAME}" == *"Kali GNU/Linux"* ]]; then
JPEGTURBO="libjpeg62-turbo-dev" JPEGTURBO="libjpeg62-turbo-dev"
if [[ "${PRETTY_NAME}" == *"stretch"* ]] || [[ "${PRETTY_NAME}" == *"buster"* ]]; then if [[ "${PRETTY_NAME}" == *"stretch"* ]] || [[ "${PRETTY_NAME}" == *"buster"* ]] || [[ "${PRETTY_NAME}" == *"Kali GNU/Linux Rolling"* ]]; then
LIBPNG="libpng-dev" LIBPNG="libpng-dev"
else else
LIBPNG="libpng12-dev" LIBPNG="libpng12-dev"
@ -392,7 +392,7 @@ mv guacamole-${GUACVERSION}.war /etc/guacamole/guacamole.war
mv guacamole-auth-jdbc-${GUACVERSION}/mysql/guacamole-auth-jdbc-mysql-${GUACVERSION}.jar /etc/guacamole/extensions/ mv guacamole-auth-jdbc-${GUACVERSION}/mysql/guacamole-auth-jdbc-mysql-${GUACVERSION}.jar /etc/guacamole/extensions/
# Create Symbolic Link for Tomcat # Create Symbolic Link for Tomcat
ln -s /etc/guacamole/guacamole.war /var/lib/${TOMCAT}/webapps/ ln -sf /etc/guacamole/guacamole.war /var/lib/${TOMCAT}/webapps/
# Deal with MySQL Connector/J # Deal with MySQL Connector/J
if [[ -z $JAVALIB ]]; then if [[ -z $JAVALIB ]]; then
@ -440,6 +440,18 @@ else
echo -e "${GREEN}OK${NC}" echo -e "${GREEN}OK${NC}"
fi fi
# restart mysql
echo -e "${BLUE}Restarting mysql...${NC}"
service mysql restart
if [ $? -ne 0 ]; then
echo -e "${RED}Failed${NC}"
exit 1
else
echo -e "${GREEN}OK${NC}"
fi
# Create $guacDb and grant $guacUser permissions to it # Create $guacDb and grant $guacUser permissions to it
# SQL code # SQL code