#!/bin/bash
port=”80″
restart=”/etc/init.d/httpd restart”
EMAIL=”/bin/echo selboo | mutt -s "重新启动httpd" root@selboo.com.cn”
netstat -ln |awk ‘/^tcp/ {print $4}' |grep -q “:$port$” || {
#reboot httpd
eval $restart;$EMAIL
exit $?
}
exit 0

2023-02-22
9万阅读

2023-02-12
6万阅读

2023-02-11
9万阅读

2023-02-03
2万阅读

2023-02-03
3万阅读

2023-01-19
12万阅读

2023-01-17
3万阅读

2023-01-17
3万阅读

2023-01-14
3万阅读

2023-01-11
2万阅读

2023-02-22
9万阅读

2023-02-12
6万阅读

2023-02-11
9万阅读

2023-02-03
2万阅读

2023-02-03
3万阅读

2023-01-19
12万阅读

2023-01-17
3万阅读

2023-01-17
3万阅读

2023-01-14
3万阅读

2023-01-11
2万阅读