#!/bin/bash
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin
export PATH

public_file=/www/server/panel/install/public.sh
if [ ! -f $public_file ];then
	wget -O $public_file http://download.bt.cn/install/public.sh -T 5;
fi
. $public_file

download_Url=$NODE_URL

nginxPhpStatus=$(cat /www/server/panel/vhost/nginx/phpfpm_status.conf |grep 73)
if [ "${nginxPhpStatus}" == "" ]; then
	rm -f /www/server/panel/vhost/nginx/phpfpm_status.conf
	wget -O /www/server/panel/vhost/nginx/phpfpm_status.conf ${download_Url}/conf/nginx/phpfpm_status.conf
fi
nginxPhpinfo=$(cat /www/server/panel/vhost/nginx/phpinfo.conf |grep 73)
if [ "${nginxPhpinfo}" == "" ]; then
	rm -f /www/server/panel/vhost/nginx/phpinfo.conf
	wget -O /www/server/panel/vhost/nginx/phpinfo.conf ${download_Url}/conf/nginx/phpinfo.conf
fi
apachePhpinfo=$(cat /www/server/panel/vhost/apache/phpinfo.conf |grep 73)
if [ "${apachePhpinfo}" == "" ];then
	rm -f /www/server/panel/vhost/apache/phpinfo.conf
	wget -O /www/server/panel/vhost/apache/phpinfo.conf ${download_Url}/conf/apache/phpinfo.conf

fi
apachePhpStatus=$(cat /www/server/apache/conf/extra/httpd-vhosts.conf |grep 73)
if [ "${apachePhpStatus}" == "" ];then
	rm -f /www/server/apache/conf/extra/httpd-vhosts.conf
	wget -O /www/server/apache/conf/extra/httpd-vhosts.conf ${download_Url}/conf/apache/httpd-vhosts.conf
fi