diff --git a/script/cmstop.sh b/script/cmstop.sh index bf0b5e5..56b5cd9 100755 --- a/script/cmstop.sh +++ b/script/cmstop.sh @@ -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