From 99a369634c7d9b9e39e4b3b6b005b70206c2841b Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Wed, 4 Sep 2019 09:26:52 +0300 Subject: [PATCH] v3.4.4.6 --- README.md | 5 +++++ install.sh | 5 ++--- update.sh | 48 ++---------------------------------------------- 3 files changed, 9 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index aa1f3df2..58cac57c 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,11 @@ Began to lead a [Twitter](https://twitter.com/haproxy_wi), subscribe! I will wri ![alt text](image/haproxy-wi-metrics.jpeg "Merics") # Install + +## RPM +[Download](https://github.com/Aidaho12/haproxy-wi/releases/download/3.4.4.6/haproxy-wi-3-4.4.6.noarch.rpm) RPM and install it + +## Script The installer will ask you a few questions ``` $ git clone https://github.com/Aidaho12/haproxy-wi.git /var/www/haproxy-wi diff --git a/install.sh b/install.sh index 4403518b..bca43ca0 100644 --- a/install.sh +++ b/install.sh @@ -57,9 +57,8 @@ else yum -y install epel-release fi yum -y install https://centos7.iuscommunity.org/ius-release.rpm - yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel python-devel python-jinja2 nodejs - npm install js-cookie --save - npm install bokehjs + yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel python-devel python-jinja2 + HTTPD_CONFIG="/etc/httpd/conf/httpd.conf" HAPROXY_WI_VHOST_CONF="/etc/httpd/conf.d/haproxy-wi.conf" HTTPD_NAME="httpd" diff --git a/update.sh b/update.sh index d699ee13..bef6a5b4 100644 --- a/update.sh +++ b/update.sh @@ -4,9 +4,6 @@ cp app/haproxy-wi.cfg /tmp/ -git reset --hard -git pull https://github.com/Aidaho12/haproxy-wi.git - mv -f /tmp/haproxy-wi.cfg app/haproxy-wi.cfg mkdir keys @@ -21,49 +18,8 @@ else yum -y install git nmap-ncat net-tools python35u dos2unix python35u-pip mod_ssl httpd python35u-devel gcc-c++ openldap-devel fi -cat << EOF > /etc/systemd/system/keep_alive.service -[Unit] -Description=Keep Alive Haproxy -After=syslog.target network.target - -[Service] -Type=simple -WorkingDirectory=$(pwd)/app/ -ExecStart=$(pwd)/app/tools/keep_alive.py - -StandardOutput=syslog -StandardError=syslog -SyslogIdentifier=keep_alive - -RestartSec=2s -Restart=on-failure -TimeoutStopSec=1s - -[Install] -WantedBy=multi-user.target -EOF - -cat << 'EOF' > /etc/rsyslog.d/keep_alive.conf -if $programname startswith 'keep_alive' then $(pwd)/log/keep_alive.log -& stop -EOF - - -cat << EOF > /etc/logrotate.d/metrics -$(pwd)/log/keep_alive.log { - daily - rotate 10 - missingok - notifempty - create 0644 apache apache - dateext - sharedscripts -} -EOF - -systemctl daemon-reload -systemctl restart keep_alive.service -systemctl enable keep_alive.service +git reset --hard +git pull https://github.com/Aidaho12/haproxy-wi.git cd app/ ./create_db.py