#!/bin/bash
url=""
status=$(/usr/bin/curl -s --head "$url" | awk '/HTTP/ {print $2}')
if [ "$status" != "200" ] ; then
killall httpd
killall httpd
sleep 30
/usr/local/apache2/bin/apachectl -f /vhost/Apache2Conf/httpd164.conf -k graceful >> /usr/local/confcenter/scripts/apache.log 2>&1
sleep 6
/usr/local/squid3/sbin/squid -f /vhost/Apache2Conf/squid164.conf >> /usr/local/confcenter/scripts/squid.log 2>&1
fi
阅读(473) | 评论(0) | 转发(0) |