6k6g-v3 / scripts /entrypoint.sh
fanyubo
fix: Dockerfile ๅ…ฅๅฃ่„šๆœฌ โ€” ๅฏๅŠจๅ‰ๆธ…็†ๆ‰€ๆœ‰ๆ—ง node ่ฟ›็จ‹
a368c71
Raw
History Blame Contribute Delete
634 Bytes
#!/bin/sh
# HF Space ๅ…ฅๅฃ็‚น๏ผšๆธ…็†ๆ‰€ๆœ‰ๆ—ง node ่ฟ›็จ‹ๅŽๅฏๅŠจ supervisord
echo "[entrypoint] Cleaning up old node processes..."
# ๆ€ๆމๆ‰€ๆœ‰้žๅฝ“ๅ‰ shell ็š„ node ่ฟ›็จ‹
for pid in $(pgrep -x node 2>/dev/null); do
echo "[entrypoint] Killing node PID $pid"
kill -9 "$pid" 2>/dev/null
done
# ไนŸๆ€ๆމๅฏ่ƒฝๆฎ‹็•™็š„ kb-worker ่ฟ›็จ‹
for pid in $(pgrep -f 'kb-worker' 2>/dev/null); do
if [ "$pid" != "$$" ]; then
echo "[entrypoint] Killing kb-worker PID $pid"
kill -9 "$pid" 2>/dev/null
fi
done
echo "[entrypoint] Cleanup done, starting supervisord..."
exec supervisord -c /etc/supervisor/conf.d/app.conf -n