agent-backend/script/cmstop.sh
Frank.R.Wu 0dd01e574e feat: update cmstop.sh
update cmstop.sh to support MacOS
2021-11-18 19:52:10 +08:00

16 lines
286 B
Bash
Executable File

#!/bin/bash
if [ -a "./PID" ]; then
if [ -d '/proc' ]; then
ls /proc/$(cat PID)/cmdline
if [ $? -eq 0 ]; then
kill -9 $(cat PID)
echo "shutdown old contract manager"
fi
else
kill -9 $(cat PID)
echo "shutdown old contract manager"
fi
rm ./PID
fi