mirror of
https://github.com/linuxserver/docker-baseimage-kasmvnc.git
synced 2026-02-20 08:28:57 +08:00
update kasm init to support egress - arch
This commit is contained in:
parent
60e32bd3dc
commit
b42e2ceb52
@ -349,6 +349,9 @@ RUN \
|
||||
chown -R 1000:1000 /kasmbins && \
|
||||
chown 1000:1000 /usr/share/kasmvnc/www/Downloads && \
|
||||
mkdir -p /dockerstartup && \
|
||||
mv \
|
||||
/usr/sbin/notify-send \
|
||||
/usr/sbin/notify-send-real && \
|
||||
echo "**** dind support ****" && \
|
||||
groupadd -r dockremap && \
|
||||
useradd -r -g dockremap dockremap && \
|
||||
|
||||
@ -351,6 +351,9 @@ RUN \
|
||||
chown -R 1000:1000 /kasmbins && \
|
||||
chown 1000:1000 /usr/share/kasmvnc/www/Downloads && \
|
||||
mkdir -p /dockerstartup && \
|
||||
mv \
|
||||
/usr/sbin/notify-send \
|
||||
/usr/sbin/notify-send-real && \
|
||||
echo "**** dind support ****" && \
|
||||
groupadd -r dockremap && \
|
||||
useradd -r -g dockremap dockremap && \
|
||||
|
||||
@ -78,6 +78,38 @@ elif ! diff -q /proot-apps/pversion ${HOME}/.local/bin/pversion > /dev/null; the
|
||||
cp /proot-apps/* ${HOME}/.local/bin/
|
||||
fi
|
||||
|
||||
## Network egress wait ##
|
||||
while :; do
|
||||
interfaces=$(ip link show type veth | awk -F: '/^[0-9]+: / {print $2}' | awk '{print $1}' | sed 's/@.*//')
|
||||
if [ -z "$interfaces" ]; then
|
||||
sleep 1
|
||||
continue
|
||||
fi
|
||||
for interface in $interfaces; do
|
||||
if [[ $interface == eth* ]]; then
|
||||
break 2
|
||||
fi
|
||||
if [[ $interface == k-p-* ]]; then
|
||||
egress_file="/dockerstartup/.egress_status"
|
||||
while [ ! -f "$egress_file" ]; do
|
||||
sleep 1
|
||||
done
|
||||
egress_status=$(cat $egress_file)
|
||||
if [ "$egress_status" == "ready" ]; then
|
||||
if [ -z "$KASM_PROFILE_LDR" ]; then
|
||||
http_proxy="" https_proxy="" curl -k "https://${KASM_API_HOST}:${KASM_API_PORT}/api/set_kasm_session_status?token=${KASM_API_JWT}" -H 'Content-Type: application/json' -d '{"status": "running"}'
|
||||
fi
|
||||
break 2
|
||||
fi
|
||||
if [ "$egress_status" == "error" ]; then
|
||||
echo "Failed to establish egress gateway. Exiting..."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
sleep 1
|
||||
done
|
||||
|
||||
## KasmVNC init ##
|
||||
# Password
|
||||
if [[ -f $HOME/.kasmpasswd ]]; then
|
||||
|
||||
3
root/usr/bin/notify-send
Executable file
3
root/usr/bin/notify-send
Executable file
@ -0,0 +1,3 @@
|
||||
#! /bin/bash
|
||||
|
||||
dbus-launch /usr/sbin/notify-send-real "$@"
|
||||
Loading…
x
Reference in New Issue
Block a user