mirror of https://github.com/Aidaho12/haproxy-wi
parent
9c749a0eb2
commit
3a82cfd432
|
@ -440,7 +440,7 @@ def update_db_v_3_5_3(**kwargs):
|
|||
|
||||
def update_ver(**kwargs):
|
||||
con, cur = get_cur()
|
||||
sql = """update version set version = '3.5.5'; """
|
||||
sql = """update version set version = '3.5.6'; """
|
||||
try:
|
||||
cur.execute(sql)
|
||||
con.commit()
|
||||
|
|
|
@ -347,8 +347,6 @@ if serv is not None and act == "configShow":
|
|||
|
||||
try:
|
||||
conf = open(cfg, "r")
|
||||
#conf = conf.read()
|
||||
#conf = funct.escape_html(conf)
|
||||
except IOError:
|
||||
print('<div class="alert alert-danger">Can\'t read import config file</div>')
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
for ARGUMENT in "$@"
|
||||
do
|
||||
|
||||
KEY=$(echo $ARGUMENT | cut -f1 -d=)
|
||||
VALUE=$(echo $ARGUMENT | cut -f2 -d=)
|
||||
|
||||
|
@ -16,8 +15,6 @@ do
|
|||
STAT_FILE) STAT_FILE=${VALUE} ;;
|
||||
*)
|
||||
esac
|
||||
|
||||
|
||||
done
|
||||
|
||||
if [[ $PROXY != "" ]]
|
||||
|
@ -27,26 +24,22 @@ then
|
|||
fi
|
||||
|
||||
if [ -f /etc/haproxy/haproxy.cfg ];then
|
||||
echo -e 'error: Haproxy already installed. You can edit config<a href="/app/config.py" title="Edit HAProxy config">here</a> <br /><br />'
|
||||
echo -e 'Info: Haproxy already installed. You can edit config<a href="/app/config.py" title="Edit HAProxy config">here</a> <br /><br />'
|
||||
exit 1
|
||||
fi
|
||||
set +x
|
||||
if hash apt-get 2>/dev/null; then
|
||||
sudo apt-get install haproxy socat -y
|
||||
else
|
||||
#wget http://cbs.centos.org/kojifiles/packages/haproxy/1.8.1/5.el7/x86_64/haproxy18-1.8.1-5.el7.x86_64.rpm
|
||||
wget http://au1.mirror.crc.id.au/repo/el7-extra/x86_64/haproxy-2.0.3-2.el7.x86_64.rpm
|
||||
#sudo yum install haproxy18-1.8.1-5.el7.x86_64.rpm -y
|
||||
sudo yum install haproxy-2.0.3-2.el7.x86_64.rpm -y
|
||||
sudo wget https://repo.haproxy-wi.org/haproxy-2.0.6-1.el7.x86_64.rpm --no-check-certificate
|
||||
sudo yum install haproxy-2.0.6-1.el7.x86_64.rpm -y
|
||||
fi
|
||||
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
sudo yum install wget socat -y > /dev/null
|
||||
#wget http://cbs.centos.org/kojifiles/packages/haproxy/1.8.1/5.el7/x86_64/haproxy18-1.8.1-5.el7.x86_64.rpm
|
||||
wget http://au1.mirror.crc.id.au/repo/el7-extra/x86_64/haproxy-2.0.3-2.el7.x86_64.rpm
|
||||
#sudo yum install haproxy18-1.8.1-5.el7.x86_64.rpm -y
|
||||
sudo yum install haproxy-2.0.3-2.el7.x86_64.rpm -y
|
||||
sudo wget https://repo.haproxy-wi.org/haproxy-2.0.6-1.el7.x86_64.rpm --no-check-certificate
|
||||
sudo yum install haproxy-2.0.6-1.el7.x86_64.rpm -y
|
||||
fi
|
||||
if [ $? -eq 1 ]
|
||||
then
|
||||
|
@ -57,8 +50,8 @@ then
|
|||
fi
|
||||
fi
|
||||
|
||||
bash -c 'echo "" > /tmp/haproxy.cfg'
|
||||
bash -c cat << EOF > /tmp/haproxy.cfg
|
||||
sudo bash -c 'echo "" > /tmp/haproxy.cfg'
|
||||
sudo bash -c cat << EOF > /tmp/haproxy.cfg
|
||||
global
|
||||
log 127.0.0.1 local2
|
||||
chroot /var/lib/haproxy
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if [[ $1 == "enable" ]]; then
|
||||
if sudo grep -q "net.ipv4.tcp_syncookies = 1" /etc/sysctl.conf; then
|
||||
echo "SYN flood protectd allready enabled"
|
||||
echo "SYN flood protect has already enabled"
|
||||
exit 1
|
||||
else
|
||||
sudo bash -c cat <<EOF >> /etc/sysctl.conf
|
||||
|
|
|
@ -205,9 +205,7 @@ sudo systemctl restart waf
|
|||
sudo rm -f /tmp/libevent-devel-2.0.21-4.el7.x86_64.rpm
|
||||
sudo rm -f /tmp/modsecurity-2.9.2.tar.gz
|
||||
sudo rm -f /tmp/yajl-devel-2.0.4-4.el7.x86_64.rpm
|
||||
#sudo rm -rf /tmp/haproxy-$VERSION
|
||||
sudo rm -rf /tmp/haproxy-$VERSION.tar.gz
|
||||
#sudo rm -rf /tmp/modsecurity-2.9.2
|
||||
|
||||
if [ $? -eq 1 ]; then
|
||||
echo "error: Can't start Haproxy WAF service <br /><br />"
|
||||
|
|
|
@ -177,6 +177,9 @@
|
|||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||
How to setup groups you can watch in this video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="servers">
|
||||
<table class="overview" id="ajax-servers">
|
||||
|
@ -302,6 +305,7 @@
|
|||
<br /><br />
|
||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
||||
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -423,6 +427,7 @@
|
|||
<div id="ajax-ssh"></div>
|
||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
||||
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ body, .container {
|
|||
<input type="hidden" value="{{reff}}" name="ref" id="ref">
|
||||
<button type="submit" name="Login" value="Enter" id="enter">Login</button>
|
||||
</form>
|
||||
<div class="alert alert-danger" style="display: none; margin-top: 220px;margin-right: -210px;width: 300px;">
|
||||
<div class="alert alert-danger wrong-login">
|
||||
Your login or password is incorrect
|
||||
<br />
|
||||
<span id="ban_10">
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<tbody id="ajaxstatus"></tbody>
|
||||
</table>
|
||||
<table class="overview-wi" style="height: 170;">
|
||||
<tr class="overviewHead">
|
||||
<tr class="overviewHead" style="height: 43px;">
|
||||
<td class="padding10 first-collumn-wi">
|
||||
{% if role <= 1 %}
|
||||
<a href="/app/viewlogs.py?viewlogs=haproxy-wi-{{date}}.log&rows=10&grep=&hour=00&minut=00&hour1=24&minut1=00" title="View HAProxy-WI logs" class="logs_link">
|
||||
|
|
|
@ -209,6 +209,7 @@
|
|||
<br /><br />
|
||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=servers" title="Servers description" target="_blank">here</a>
|
||||
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -314,6 +315,7 @@
|
|||
<div id="ajax-ssh"></div>
|
||||
<div class="add-note addName alert-info" style="width: inherit; margin-right: 15px;">
|
||||
You can read the description of all parameters <a href="https://haproxy-wi.org/description.py?description=creds" title="Servers description" target="_blank">here</a>
|
||||
or watch video <a href="https://haproxy-wi.org/description.py?description=setup" title="How to setup servers, group and SSH credentials" target="_blank">here</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -688,6 +688,12 @@ td,th {
|
|||
background-color: #fff3cd;
|
||||
border-color: #ffeeba;
|
||||
}
|
||||
.wrong-login {
|
||||
display: none;
|
||||
margin-top: 220px;
|
||||
margin-right: 50px;
|
||||
width: 300px;
|
||||
}
|
||||
.validateTips {
|
||||
width: 540px;
|
||||
margin: 0;
|
||||
|
@ -822,6 +828,14 @@ label {
|
|||
width: 32.4%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1900px) {
|
||||
#logo_span {
|
||||
margin-left: 15%;
|
||||
}
|
||||
.wrong-login {
|
||||
margin-right: -150px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1080px) {
|
||||
#logo_span {
|
||||
margin-left: -5%;
|
||||
|
@ -835,6 +849,9 @@ label {
|
|||
width: 95%;
|
||||
max-width: 95%;
|
||||
}
|
||||
.wrong-login {
|
||||
margin-right: -50px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 1024px) {
|
||||
#logo_span {
|
||||
|
@ -849,6 +866,27 @@ label {
|
|||
width: 95%;
|
||||
max-width: 95%;
|
||||
}
|
||||
.wrong-login {
|
||||
margin-right: -150px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#logo_span {
|
||||
margin-left: -12%;
|
||||
border: none;
|
||||
}
|
||||
.chart-container {
|
||||
position: relative;
|
||||
height: 410px;
|
||||
width: 95%;
|
||||
}
|
||||
.overview-wi {
|
||||
width: 95%;
|
||||
max-width: 95%;
|
||||
}
|
||||
.wrong-login {
|
||||
margin-right: -260px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 667px) {
|
||||
#logo_span {
|
||||
|
@ -864,20 +902,8 @@ label {
|
|||
width: 95%;
|
||||
max-width: 95%;
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
#logo_span {
|
||||
margin-left: -12%;
|
||||
border: none;
|
||||
}
|
||||
.chart-container {
|
||||
position: relative;
|
||||
height: 410px;
|
||||
width: 95%;
|
||||
}
|
||||
.overview-wi {
|
||||
width: 95%;
|
||||
max-width: 95%;
|
||||
.wrong-login {
|
||||
margin-right: -210px;
|
||||
}
|
||||
}
|
||||
.loading, .loading_full_page, .loading_hapwi_overview {
|
||||
|
|
Loading…
Reference in New Issue