Minor bugfixes at haproxy config creation.
This commit is contained in:
@@ -39,25 +39,31 @@ do
|
|||||||
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "CLOSE_WRITE,CLOSE" ]]; then
|
||||||
DOMAIN=$(echo $file);
|
DOMAIN=$(echo $file);
|
||||||
|
|
||||||
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
||||||
echo "haproxy config created, changed";
|
echo "haproxy config created, changed";
|
||||||
/scripts/config_haproxy_create.sh;
|
/scripts/config_haproxy_create.sh;
|
||||||
fi
|
else
|
||||||
|
|
||||||
echo "domain config created, changed";
|
echo "domain config created, changed";
|
||||||
/scripts/nginx_config_create.sh "$DOMAIN";
|
/scripts/nginx_config_create.sh "$DOMAIN";
|
||||||
|
|
||||||
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
||||||
/scripts/check_proxy_state.sh "$DOMAIN";
|
/scripts/check_proxy_state.sh "$DOMAIN";
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "DELETE" ]] ; then
|
elif [[ "${parent}" == "${DOMAIN_DIR}" && "${op}" == "DELETE" ]] ; then
|
||||||
DOMAIN=$(echo $file);
|
DOMAIN=$(echo $file);
|
||||||
echo "domain deleted";
|
echo "domain deleted";
|
||||||
|
|
||||||
|
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
||||||
|
echo "haproxy config deleted";
|
||||||
|
/scripts/config_haproxy_create.sh;
|
||||||
|
else
|
||||||
if [ ! -f "$DOMAIN_DIR/$DOMAIN" ]; then
|
if [ ! -f "$DOMAIN_DIR/$DOMAIN" ]; then
|
||||||
/scripts/nginx_config_create.sh "$DOMAIN" "DEL";
|
/scripts/nginx_config_create.sh "$DOMAIN" "DEL";
|
||||||
/scripts/check_proxy_state.sh "$DOMAIN" "DEL";
|
/scripts/check_proxy_state.sh "$DOMAIN" "DEL";
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user