Use Workspace var
This commit is contained in:
parent
59b4f07cae
commit
c899ac69a4
@ -1,8 +1,11 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
mkdir -p /config/{.vscode-headless,.config,.ssh}
|
||||
mkdir -p /run/dbus
|
||||
mkdir -p /config/{.vscode-headless,.config,.ssh,workspace}
|
||||
|
||||
if [ ! -d "${DEFAULT_WORKSPACE}" ];then
|
||||
echo -n "/config/workspace" >/run/s6/container_environment/DEFAULT_WORKSPACE
|
||||
fi
|
||||
|
||||
if [ -n "${SUDO_PASSWORD}" ] || [ -n "${SUDO_PASSWORD_HASH}" ]; then
|
||||
echo "setting up sudo access"
|
||||
|
@ -1,9 +1,7 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
# shellcheck shell=bash
|
||||
|
||||
until [[ -e /run/dbus/system_bus_socket ]]; do
|
||||
sleep 1s
|
||||
done
|
||||
env | sort > /svc-env
|
||||
|
||||
if [ -n "$CONNECTION_SECRET" ]; then
|
||||
CODE_LOCAL_ARGS="${CODE_LOCAL_ARGS} --connection-token-file ${CONNECTION_SECRET}"
|
||||
@ -17,6 +15,7 @@ fi
|
||||
|
||||
exec \
|
||||
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z 127.0.0.1 8000" \
|
||||
cd "$DEFAULT_WORKSPACE" \
|
||||
s6-setuidgid abc \
|
||||
/usr/local/bin/code-server serve-local \
|
||||
--accept-server-license-terms\
|
||||
|
@ -6,9 +6,10 @@ until [[ -e /run/dbus/system_bus_socket ]]; do
|
||||
done
|
||||
|
||||
exec \
|
||||
cd "$DEFAULT_WORKSPACE" \
|
||||
s6-setuidgid abc \
|
||||
/usr/local/bin/code-server serve \
|
||||
--accept-server-license-terms \
|
||||
--random-name \
|
||||
--disable-telemetry \
|
||||
${CODE_ARGS}
|
||||
${CODE_ARGS} || exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user