1.4 KiB
1.4 KiB
Plan: Add --no-sleep to code tunnel and change exec to run tunnel directly
Context
The user wants two changes in entrypoint.sh:
- Add
--no-sleepflag to thecode tunnelinvocations at the end of the file. - Change the
execat line 84 to runcode tunneldirectly instead of re-invoking the entrypoint script.
Files to modify
entrypoint.sh— lines 83–86 and 173–177
Changes
1. Replace the exec re-invocation (line 84)
Before:
exec sudo -u $HOME_USER bash -c "source /etc/environment; /usr/bin/entrypoint.sh"
After:
exec sudo ${HOME_USER} -c "code tunnel --accept-server-license-terms --no-sleep --name ${VSCODE_TUNNEL_NAME}"
2. Add --no-sleep to the existing code tunnel calls (lines 173–177)
Before:
if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms --name ${VSCODE_TUNNEL_NAME}"
else
sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms"
fi
After:
if [[ -v VSCODE_TUNNEL_NAME && -n "${VSCODE_TUNNEL_NAME}" ]]; then
sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms --no-sleep --name ${VSCODE_TUNNEL_NAME}"
else
sudo su ${HOME_USER} -c "code tunnel --accept-server-license-terms --no-sleep"
fi
Verification
grep -- '--no-sleep' entrypoint.shshould show 3 matches (1 in exec line, 2 in the if/else block).