Spaces:
Paused
Paused
Update entrypoint.sh
Browse files62 unmodified lines636465666768697071727374757677787918 unmodified lines9899100909110110210362 unmodified lines
rm -rf "$CONFIG_TEMP"
# ============================================# PLUGIN DEPS: npm install for tools/plugins# ============================================if [ -f "$HOME/.config/opencode/package.json" ]; then echo '=== [PLUGIN] Installing plugin dependencies ===' cd "$HOME/.config/opencode" && npm install 2>&1 echo '=== [PLUGIN] Plugin deps installed ==='else echo '=== [PLUGIN] No package.json found, skipping install ==='fi
# ============================================# STEP 2: START OPENCODE (with RAM watchdog)# ============================================18 unmodified lines SELF_KB=$(ps --no-headers -o rss -p "$OPENCODE_PID" 2>/dev/null | awk '{print $1+0}') TOTAL_KB=$((USED_KB + SELF_KB))
#echo "=== [RAM] OpenCode using: $((TOTAL_KB / 1024))MB / 14336MB ==="
if [ "$TOTAL_KB" -ge "$RAM_LIMIT_KB" ]; then echo "=== [RAM] LIMIT EXCEEDED! Killing OpenCode (${TOTAL_KB}KB >= ${RAM_LIMIT_KB}KB) ===" kill -9 "$OPENCODE_PID" 2>/dev/nullentrypoint.sh+11-2