28 lines
634 B
Bash
Executable File
28 lines
634 B
Bash
Executable File
#!/usr/bin/env bash
|
|
WORKDIR="$(cd "$(dirname "$0")" && pwd)"
|
|
cd "$WORKDIR"
|
|
|
|
if [ -f pipeline.pid ]; then
|
|
pid=$(cat pipeline.pid)
|
|
if kill -0 "$pid" 2>/dev/null; then
|
|
kill "$pid"
|
|
echo "Stopped PID $pid"
|
|
else
|
|
echo "Process $pid not running"
|
|
fi
|
|
rm -f pipeline.pid
|
|
else
|
|
echo "No pid file found"
|
|
fi
|
|
|
|
if [ -f pipeline-accounting.pid ]; then
|
|
pid=$(cat pipeline-accounting.pid)
|
|
if kill -0 "$pid" 2>/dev/null; then
|
|
kill "$pid"
|
|
echo "Stopped accounting worker PID $pid"
|
|
else
|
|
echo "Accounting worker $pid not running"
|
|
fi
|
|
rm -f pipeline-accounting.pid
|
|
fi
|