Correspondig domain access check.
This commit is contained in:
@@ -24,8 +24,6 @@ do_proxy_restart() {
|
|||||||
if docker ps | grep $proxies ; then
|
if docker ps | grep $proxies ; then
|
||||||
if [ -z "$DOMAIN" ] ; then
|
if [ -z "$DOMAIN" ] ; then
|
||||||
echo "$proxies restarted successful";
|
echo "$proxies restarted successful";
|
||||||
else
|
|
||||||
check_domain;
|
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PROXY_NAME=$proxies
|
PROXY_NAME=$proxies
|
||||||
@@ -49,9 +47,10 @@ do_proxy_restart() {
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
check_domain;
|
||||||
# in case of new proxy configuration generated needed to copy the domain name to the configs file.then remove new_config flag.
|
# in case of new proxy configuration generated needed to copy the domain name to the configs file.then remove new_config flag.
|
||||||
if [[ -f $PROXY_CONFIG_DIR/new_config ]] ; then
|
if [[ -f $PROXY_CONFIG_DIR/new_config ]] ; then
|
||||||
if [[ "$(grep $DOMAIN $PROXY_CONFIG_DIR/config)" == "" || ! -f $PROXY_CONFIG_DIR/config ]] ; then
|
if [[ ! -f $PROXY_CONFIG_DIR/config || "$(grep $DOMAIN $PROXY_CONFIG_DIR/config)" == "" ]] ; then
|
||||||
cat $PROXY_CONFIG_DIR/new_config >> $PROXY_CONFIG_DIR/config;
|
cat $PROXY_CONFIG_DIR/new_config >> $PROXY_CONFIG_DIR/config;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -63,9 +62,9 @@ check_domain() {
|
|||||||
echo "Checking $DOMAIN name";
|
echo "Checking $DOMAIN name";
|
||||||
CURL_CHECK="curl -s -o /dev/null -w "%{http_code}" https://$DOMAIN";
|
CURL_CHECK="curl -s -o /dev/null -w "%{http_code}" https://$DOMAIN";
|
||||||
if [[ "$(eval $CURL_CHECK)" == "200" ]] ; then
|
if [[ "$(eval $CURL_CHECK)" == "200" ]] ; then
|
||||||
echo "$proxies restarted successful";
|
echo "$DOMAIN accessed successful";
|
||||||
else
|
else
|
||||||
send_error_msg;
|
send_error_msg $DOMAIN;
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user