From 2603acf846f50ffb0dcae9a359a834987d509bcc Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Fri, 3 Apr 2020 22:05:35 +0200 Subject: [PATCH] v4.2.1.0 https://haproxy-wi.org/changelog.py#4_2_1 --- README.md | 2 ++ app/create_db.py | 2 +- app/scripts/waf.sh | 9 +++++---- inc/waf.js | 6 +++--- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index df8b962a..9c195102 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,8 @@ Web interface(user-friendly web GUI, alerting, monitoring and secure) for managi # Features: 1. Installation and updating HAProxy, Nginx and Keepalived with HAProxy-WI +1. Installation and updating Grafana, Prometheus servers with HAProxy-WI +1. Installation and updating HAProxy and Nginx exporters with HAProxy-WI 2. Configure HAProxy, Nginx and Keepalived In a jiffy with HAProxy-WI 3. View and analyse Status of all Frontend/backend server via HAProxy-WI from a single control panel. 4. Enable/disable servers through stats page without rebooting HAProxy diff --git a/app/create_db.py b/app/create_db.py index d7d20027..71f59871 100644 --- a/app/create_db.py +++ b/app/create_db.py @@ -432,7 +432,7 @@ def update_db_v_42(**kwargs): def update_ver(**kwargs): con, cur = get_cur() - sql = """update version set version = '4.2.0.0'; """ + sql = """update version set version = '4.2.1.0'; """ try: cur.execute(sql) con.commit() diff --git a/app/scripts/waf.sh b/app/scripts/waf.sh index 4738de83..208730e3 100644 --- a/app/scripts/waf.sh +++ b/app/scripts/waf.sh @@ -161,7 +161,7 @@ SyslogIdentifier=waf [Install] WantedBy=multi-user.target EOF -sudo mv /tmp/waf.service /etc/systemd/system/multi-user.target.wants/waf.service +sudo mv /tmp/waf.service /etc/systemd/system/waf.service sudo bash -c 'cat << EOF > /etc/rsyslog.d/waf.conf if $programname startswith "waf" then /var/log/waf.log & stop @@ -195,12 +195,13 @@ backend waf server waf 127.0.0.1:12345 check EOF' fi - + +sudo rm -f /tmp/modsecurity.tar.gz +sudo rm -rf /tmp/haproxy-$VERSION.tar.gz + sudo systemctl daemon-reload sudo systemctl enable waf sudo systemctl restart waf -sudo rm -f /tmp/modsecurity.tar.gz -sudo rm -rf /tmp/haproxy-$VERSION.tar.gz if [ $? -eq 1 ]; then echo "error: Can't start Haproxy WAF service

" diff --git a/inc/waf.js b/inc/waf.js index 4e32d434..f929d752 100644 --- a/inc/waf.js +++ b/inc/waf.js @@ -59,13 +59,13 @@ function metrics_waf(name) { } } ); } -function installWaf(ip) { +function installWaf(ip1) { $("#ajax").html('') $("#ajax").html('
Please don\'t close and don\'t represh page. Wait until the work is completed. This may take some time
'); $.ajax( { url: "options.py", data: { - installwaf: ip, + installwaf: ip1, token: $('#token').val() }, type: "POST", @@ -84,7 +84,7 @@ function installWaf(ip) { } else if (data.indexOf('success') != '-1' ){ $('.alert-danger').remove(); $('.alert-warning').remove(); - $("#ajax").html('
'+data+''); + $("#ajax").html('
WAF service has installed'); showOverviewWaf(ip, hostnamea) } }