check_temp.sh 270 B

123456789101112131415
  1. #!/bin/bash
  2. Cluster=`cnmon info | grep "Cluster 0"`
  3. info=${Cluster}
  4. b=${info//[A-Za-z :]/}
  5. temp=${b:1}
  6. echo "temp:$temp℃"
  7. if[ $temp -gt 85 ]
  8. then
  9. ehco "Temperature is too high, Portal algorithm service"
  10. docker stop gsd_cnstream_1
  11. exit 1
  12. else
  13. exit 0
  14. fi