mirror of
https://gitee.com/BDWare/agent-backend
synced 2025-01-10 09:54:11 +00:00
feat: update cmstop.sh
update cmstop.sh to support MacOS
This commit is contained in:
parent
801c1a93f5
commit
0dd01e574e
@ -1,10 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ -a "./PID" ]; then
|
if [ -a "./PID" ]; then
|
||||||
|
if [ -d '/proc' ]; then
|
||||||
ls /proc/$(cat PID)/cmdline
|
ls /proc/$(cat PID)/cmdline
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
kill -9 $(cat PID)
|
kill -9 $(cat PID)
|
||||||
echo "shutdown old contract manager"
|
echo "shutdown old contract manager"
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
kill -9 $(cat PID)
|
||||||
|
echo "shutdown old contract manager"
|
||||||
|
fi
|
||||||
rm ./PID
|
rm ./PID
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user