diff --git a/scripts/config_haproxy_create.sh b/scripts/config_haproxy_create.sh index afab09c..e7d4d20 100755 --- a/scripts/config_haproxy_create.sh +++ b/scripts/config_haproxy_create.sh @@ -8,12 +8,12 @@ DOMAIN_DIR=$DOMAIN_DIR PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR cd $DOMAIN_DIR -file="$PROXY_DIR/haproxy.cfg" +file="$PROXY_CONFIG_DIR/haproxy.cfg" global_http="/scripts/global_http" global_https="/scripts/global_https" -cp -a /scripts/haproxy_template.cfg $PROXY_DIR/haproxy.cfg +cp -a /scripts/haproxy_template.cfg $PROXY_CONFIG_DIR/haproxy.cfg { @@ -126,4 +126,4 @@ for i in `ls $DOMAIN_DIR|cut -d / -f2` ; do done } >> "$file"; -echo "$DOMAIN" >> $PROXY_DIR/new_config +echo "$DOMAIN" >> $PROXY_CONFIG_DIR/new_config diff --git a/scripts/scheduler.sh b/scripts/scheduler.sh index 539c068..1c50f8c 100755 --- a/scripts/scheduler.sh +++ b/scripts/scheduler.sh @@ -42,6 +42,10 @@ do if [[ "${PROXY_TYPE}" == "haproxy" ]]; then echo "haproxy config created, changed"; /scripts/config_haproxy_create.sh; + + if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then + /scripts/check_proxy_state.sh "$DOMAIN"; + fi else echo "domain config created, changed"; /scripts/nginx_config_create.sh "$DOMAIN"; @@ -58,6 +62,10 @@ do if [[ "${PROXY_TYPE}" == "haproxy" ]]; then echo "haproxy config deleted"; /scripts/config_haproxy_create.sh; + + if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then + /scripts/check_proxy_state.sh; + fi else if [ ! -f "$DOMAIN_DIR/$DOMAIN" ]; then /scripts/nginx_config_create.sh "$DOMAIN" "DEL";