歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> SHELL編程 >> 檢測tomcat運行狀態,自動重啟TOMCAT腳本SHELL

檢測tomcat運行狀態,自動重啟TOMCAT腳本SHELL

日期:2017/3/1 15:36:18   编辑:SHELL編程
檢測tomcat運行狀態,自動重啟TOMCAT腳本SHELL #!/bin/bash jiankong() { netstat -ant|grep 8080 t=$? if [[ $t -eq 0 ]] ;then echo "8080 is ok" fi if [[ $t -eq 1 ]] ;then echo "8080 is down" service tomcat restart & fi } while : do jiankong sleep 3 done
Copyright © Linux教程網 All Rights Reserved