15 lines
276 B
Bash
Executable File
15 lines
276 B
Bash
Executable File
#!/bin/bash
|
|
cd "$(dirname "$0")"
|
|
if [ -f ah.pid ]; then
|
|
PID=$(cat ah.pid)
|
|
if kill -0 $PID 2>/dev/null; then
|
|
kill $PID
|
|
echo "Stopped (PID $PID)"
|
|
else
|
|
echo "Process $PID not running"
|
|
fi
|
|
rm -f ah.pid
|
|
else
|
|
echo "No ah.pid found"
|
|
fi
|