feat: update cmstop.sh

update cmstop.sh to support MacOS
This commit is contained in:
Frank.R.Wu 2021-11-18 19:52:10 +08:00
parent 801c1a93f5
commit 0dd01e574e

View File

@ -1,8 +1,13 @@
#!/bin/bash
if [ -a "./PID" ]; then
ls /proc/$(cat PID)/cmdline
if [ $? -eq 0 ]; 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