Minor bugfixes in scheduler and haproxy config creation files.
This commit is contained in:
@@ -8,12 +8,12 @@ DOMAIN_DIR=$DOMAIN_DIR
|
|||||||
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
|
PROXY_CONFIG_DIR=$PROXY_CONFIG_DIR
|
||||||
|
|
||||||
cd $DOMAIN_DIR
|
cd $DOMAIN_DIR
|
||||||
file="$PROXY_DIR/haproxy.cfg"
|
file="$PROXY_CONFIG_DIR/haproxy.cfg"
|
||||||
|
|
||||||
global_http="/scripts/global_http"
|
global_http="/scripts/global_http"
|
||||||
global_https="/scripts/global_https"
|
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
|
done
|
||||||
|
|
||||||
} >> "$file";
|
} >> "$file";
|
||||||
echo "$DOMAIN" >> $PROXY_DIR/new_config
|
echo "$DOMAIN" >> $PROXY_CONFIG_DIR/new_config
|
||||||
|
@@ -42,6 +42,10 @@ do
|
|||||||
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;
|
||||||
|
|
||||||
|
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
||||||
|
/scripts/check_proxy_state.sh "$DOMAIN";
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
echo "domain config created, changed";
|
echo "domain config created, changed";
|
||||||
/scripts/nginx_config_create.sh "$DOMAIN";
|
/scripts/nginx_config_create.sh "$DOMAIN";
|
||||||
@@ -58,6 +62,10 @@ do
|
|||||||
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
if [[ "${PROXY_TYPE}" == "haproxy" ]]; then
|
||||||
echo "haproxy config deleted";
|
echo "haproxy config deleted";
|
||||||
/scripts/config_haproxy_create.sh;
|
/scripts/config_haproxy_create.sh;
|
||||||
|
|
||||||
|
if [ -f "$PROXY_CONFIG_DIR/new_config" ] ; then
|
||||||
|
/scripts/check_proxy_state.sh;
|
||||||
|
fi
|
||||||
else
|
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";
|
||||||
|
Reference in New Issue
Block a user