Bugs fixed
pull/19/head
Aidaho12 2018-04-28 11:17:06 +06:00
parent 115cb257ee
commit 5cdf827e1d
3 changed files with 8 additions and 4 deletions

View File

@ -20,13 +20,14 @@ A simple web interface(user-frendly web GUI) for managing Haproxy servers. Leave
14. Server groups
15. Telegram notification
16. Creating HA HAProxy cluster
17. Editing keepalived configs
# Install
The installer will ask you a few questions
```
$ git clone https://github.com/Aidaho12/haproxy-wi.git /var/www/haproxy-wi
$ chmod +x install
$ cd /var/www/haproxy-wi
$ chmod +x install.sh
$ ./install
```
## Manual install

View File

@ -22,7 +22,7 @@ print('<script src="/inc/users.js"></script>'
'<td>Slave</td>'
'<td>VRRP interface</td>'
'<td>VRRP IP</td>'
'<td>Install HAProxy</td>'
'<td><span title="Will be installed the latest version that you have in the repository">Install HAProxy(?)</span></td>'
'<td></td>'
'</tr>'
'<tr>'

View File

@ -42,7 +42,7 @@ if [[ $MINSTALL == 1 ]];then
yum -y install mariadb mariadb-server mysql-devel
fi
if [[ $(cat /etc/*-rele* |grep NAME |head -1) == 'NAME="Red Hat Enterprise Linux Server"' ]];then
if [[ $(cat /etc/*-rele* |grep NAME |head -1) != 'NAME="Red Hat Enterprise Linux Server"' ]];then
yum -y install epel-release
fi
@ -107,7 +107,7 @@ cat << EOF > /etc/httpd/conf.d/haproxy-wi.conf
CustomLog /var/log/httpd/haproxy-wi.access.log combined
DocumentRoot /var/www/$HOME_HAPROXY_WI
ScriptAlias "/cgi-bin/ /var/www/"$HOME_HAPROXY_WI/cgi-bin/"
ScriptAlias "/cgi-bin/ "/var/www/$HOME_HAPROXY_WI/cgi-bin/"
<Directory $HOME_HAPROXY_WI>
@ -236,6 +236,9 @@ if [[ $DB == 2 ]];then
echo ""
echo "################################"
sed -i '0,/enable = 0/s//enable = 1/' /var/www/$HOME_HAPROXY_WI/cgi-bin/haproxy-webintarface.config
else
cd /var/www/$HOME_HAPROXY_WI/cgi-bin
./update_db.py
fi
if [[ -n $IP ]];then
sed -i "0,/mysql_host = 127.0.0.1/s//mysql_host = $IP/" /var/www/$HOME_HAPROXY_WI/cgi-bin/haproxy-webintarface.config