-
Notifications
You must be signed in to change notification settings - Fork 11
/
start.sh
executable file
·23 lines (17 loc) · 953 Bytes
/
start.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/bash
docker-compose rm --stop --force
if [[ "$(docker images -q inlets/inlets:3.0.2 2> /dev/null)" == "" ]]; then
docker build -t inlets/inlets:3.0.2 https://github.com/inlets/inlets.git#3.0.2
fi
docker pull guacamole/guacd
docker pull guacamole/guacamole
# Download and install 2-FA TOTP extension for Guacamole
GUAC_VER=1.3.0
EXTENSION_DIR=./guac_home/extensions
mkdir -p $EXTENSION_DIR
curl -SLo $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER.tar.gz "https://apache.org/dyn/closer.lua/guacamole/$GUAC_VER/binary/guacamole-auth-totp-$GUAC_VER.tar.gz?action=download"
tar -xzf $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER.tar.gz -C $EXTENSION_DIR
mv -f $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER/guacamole-auth-totp-$GUAC_VER.jar $EXTENSION_DIR/.
rm -rf $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER.tar.gz
chown root:root $EXTENSION_DIR/guacamole-auth-totp-$GUAC_VER.jar
docker-compose up -d