This repository was archived by the owner on Apr 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +31
-3
lines changed
root/etc/services.d/autostart Expand file tree Collapse file tree 4 files changed +31
-3
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ RUN \
111111 nodejs \
112112 openbox && \
113113 apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
114- ossp-uuid && \
114+ ossp-uuid \
115+ websocat && \
115116 echo "**** openbox tweaks ****" && \
116117 sed -i \
117118 's/NLIMC/NLMC/g' \
Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ RUN \
111111 nodejs \
112112 openbox && \
113113 apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
114- ossp-uuid && \
114+ ossp-uuid \
115+ websocat && \
115116 echo "**** openbox tweaks ****" && \
116117 sed -i \
117118 's/NLIMC/NLMC/g' \
Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ RUN \
111111 nodejs \
112112 openbox && \
113113 apk add --no-cache --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing \
114- ossp-uuid && \
114+ ossp-uuid \
115+ websocat && \
115116 echo "**** openbox tweaks ****" && \
116117 sed -i \
117118 's/NLIMC/NLMC/g' \
Original file line number Diff line number Diff line change 1+ #!/usr/bin/with-contenv bash
2+
3+ # just sleep if autostart is not enabled
4+ if [ -z ${GUIAUTOSTART+x} ]; then
5+ echo "[guac-init] Auto start not set, application start on login"
6+ sleep infinity
7+ # start abc session by sending a token to guacamole via websockets
8+ else
9+ # make sure services are up
10+ until \
11+ $(true &>/dev/null </dev/tcp/127.0.0.1/3350) && \
12+ $(true &>/dev/null </dev/tcp/127.0.0.1/4822) && \
13+ $(true &>/dev/null </dev/tcp/127.0.0.1/${CUSTOM_PORT:=3000}) &&
14+ $(true &>/dev/null </dev/tcp/127.0.0.1/3389)
15+ do
16+ sleep .5
17+ done
18+ echo "[guac-init] Auto start set, starting application"
19+ sleep 1
20+ # generate a token based on env vars
21+ cd /gclient
22+ TOKEN=$(node maketoken.js)
23+ websocat -q -n ws://localhost:${CUSTOM_PORT:=3000}/guaclite?token=${TOKEN}
24+ sleep infinity
25+ fi
You can’t perform that action at this time.
0 commit comments