lighthouse/scripts/local_testnet/kill_processes.sh

20 lines
298 B
Bash
Raw Normal View History

#!/usr/bin/env bash
# Kill processes
set -Euo pipefail
# First parameter is the file with
# one pid per line.
if [ -f "$1" ]; then
while read pid
do
# handle the case of blank lines
[[ -n "$pid" ]] || continue
echo killing $pid
2022-12-02 14:20:43 +00:00
kill $pid || true
done < $1
fi