httpd停止后 ,還是輸出http is ok
#!/bin/bash status=$(ps?aux?|?grep?httpd?|?grep?-v?grep) if?[?-n?"$status"?] ????????then ????????????????echo?"$(date)?http?is?ok" ????????else ????????????????echo?"$(date)?http?is?down" ????????????????/etc/rc.d/init.d/httpd?start fi
2017-11-30
找到原因了,腳本名稱不能含有httpd