exit.sh 871 B

1234567891011121314151617181920212223242526272829
  1. #! /bin/bash
  2. # kill chutian nodes
  3. # yct
  4. yct_proc=$(ps -ef|grep measure_wj|grep -v grep|awk '{print $2}')
  5. # zzw
  6. zzw_proc=$(ps -ef|grep zzw|grep -v grep|awk '{print $2}')
  7. # huli
  8. #huli_proc=$(ps -ef|grep 'terminal '|grep -v grep|awk '{print $2}')
  9. # wk
  10. wk_proc=$(ps -ef|grep wk|grep -v grep|grep -v awk|awk '{print $2}')
  11. # bash
  12. bash_proc=$(ps -ef|grep bash|grep -v grep|grep -v awk|awk '{print $2}')
  13. # python3
  14. p3=$(ps -ef|grep node.py|grep -v grep|grep -v awk|awk '{print $2}')
  15. if [ $(echo $yct_proc|wc -L) -gt 0 -o $(echo $zzw_proc|wc -L) -gt 0 -o $(echo $huli_proc|wc -L) -gt 0 -o $(echo $wk_proc|wc -L) -gt 0 -o $(echo $bash_proc|wc -L) -gt 0 ] ; then
  16. echo "chutian nodes ready to kill" $yct_proc "|| " $zzw_proc "|| " $huli_proc "|| " $wk_proc "|| " $bash_proc
  17. kill $yct_proc $zzw_proc $wk_proc $bash_proc
  18. else
  19. echo "cannot find node to kill"
  20. fi
  21. #$huli_proc