diff --git a/startup.sh b/startup.sh index 4e2fe67..6bdfc78 100644 --- a/startup.sh +++ b/startup.sh @@ -24,7 +24,8 @@ if [ -n "$GITEA_REPO" ] && [ -n "$GITEA_TOKEN" ]; then fi git config --global credential.helper store - printf "https://vibn:%s@%s\n" "$GITEA_TOKEN" "${GITEA_BASE#https://}" \ + printf "https://vibn:%s@%s +" "$GITEA_TOKEN" "${GITEA_BASE#https://}" \ > /home/theia/.git-credentials 2>/dev/null || true git config --global user.name "Vibn IDE" git config --global user.email "ide@vibnai.com" @@ -68,6 +69,12 @@ SETTINGS echo "[startup] Settings written to ${SETTINGS_DIR}/settings.json" +# ── Start sync server (agent runner calls this to trigger git pull) ─────────── +if [ -f /sync-server.js ]; then + echo "[startup] Starting sync server on :3001..." + node /sync-server.js & +fi + # ── Start Theia ─────────────────────────────────────────────────────────────── echo "[startup] Starting Theia → ${OPEN_PATH}" exec node /home/theia/applications/browser/lib/backend/main.js \