Skip to content
This repository was archived by the owner on Apr 25, 2023. It is now read-only.

Commit 4de6b43

Browse files
committed
support SUBFOLDER with GUIAUTOSTART env var
1 parent 4f910d3 commit 4de6b43

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

  • root/etc/services.d/autostart

root/etc/services.d/autostart/run

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/with-contenv bash
22

3+
# set SUBFOLDER to default if unset
4+
if [ -z ${SUBFOLDER+x} ]; then
5+
SUBFOLDER="/"
6+
fi
7+
38
# just sleep if autostart is not enabled
49
if [ -z ${GUIAUTOSTART+x} ]; then
510
echo "[guac-init] Auto start not set, application start on login"
@@ -20,6 +25,6 @@ else
2025
# generate a token based on env vars
2126
cd /gclient
2227
TOKEN=$(node maketoken.js)
23-
websocat -q -n ws://localhost:${CUSTOM_PORT:=3000}/guaclite?token=${TOKEN}
28+
websocat -q -n ws://localhost:${CUSTOM_PORT:=3000}${SUBFOLDER}guaclite?token=${TOKEN}
2429
sleep infinity
2530
fi

0 commit comments

Comments
 (0)