14 lines
527 B
Bash
Executable File
14 lines
527 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
# run_all_stop.sh — send stop signal to run_all.sh loop mode
|
|
|
|
touch /workspace/.run_all_stop
|
|
echo "[run_all_stop] stop signal sent. run_all.sh will exit after current exploration cycle."
|
|
|
|
# Also send SIGTERM to run_all.sh directly (excluding this script)
|
|
PIDS=$(ps aux | grep -E "run_all\.sh" | grep -v grep | grep -v run_all_stop | awk '{print $2}' || true)
|
|
if [[ -n "$PIDS" ]]; then
|
|
echo "[run_all_stop] sending SIGTERM to run_all.sh pids: $PIDS"
|
|
kill $PIDS 2>/dev/null || true
|
|
fi
|