VM-Dashboard-Manager/stop.sh

18 lines
230 B
Bash
Executable File

#!/bin/bash
PID=$(cat flask.pid)
kill $PID
processes=$(lsof -ti :5000)
if [ -z "$processes" ]; then
echo "No processes"
else
echo "$processes"
for pid in $processes; do
kill $pid
done
fi
rm "flask.pid"