File size: 787 Bytes
b4f3c4e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/with-contenv bash

if [ -n "$CONNECTION_SECRET" ]; then
    CODE_ARGS="${CODE_ARGS} --connection-secret ${CONNECTION_SECRET}"
    echo "Using connection secret from ${CONNECTION_SECRET}"
elif [ -n "$CONNECTION_TOKEN" ]; then
    CODE_ARGS="${CODE_ARGS} --connection-token ${CONNECTION_TOKEN}"
    echo "Using connection token ${CONNECTION_TOKEN}"
else
    CODE_ARGS="${CODE_ARGS} --without-connection-token"
    echo "**** No connection token is set ****"
fi

exec \
    s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 3000" \
        cd /app/openvscode-server s6-setuidgid abc \
            /app/openvscode-server/bin/openvscode-server \
                --host 0.0.0.0 \
                --port 3000 \
                --disable-telemetry \
                ${CODE_ARGS}