Zabbix web-interface maintenance mode support

This commit is contained in:
Alexey Pustovalov 2020-09-11 10:07:55 -04:00
commit e853ea14c6
42 changed files with 531 additions and 0 deletions

View File

@ -19,3 +19,6 @@ ZBX_SERVER_NAME=Composed installation
# ZBX_SESSION_NAME=zbx_sessionid
# Timezone one of: http://php.net/manual/en/timezones.php
# PHP_TZ=Europe/Riga
# ZBX_DENY_GUI_ACCESS=false
# ZBX_GUI_ACCESS_IP_RANGE=['127.0.0.1']
# ZBX_GUI_WARNING_MSG=Zabbix is under maintenance.

View File

@ -79,9 +79,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -170,6 +170,10 @@ prepare_web_server() {
prepare_zbx_web_config() {
echo "** Preparing Zabbix frontend configuration file"
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -74,9 +74,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -179,6 +179,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -79,9 +79,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
./locale/make_mo.sh && \
mkdir -p /var/lib/locales/supported.d/ && \
rm -f /var/lib/locales/supported.d/local && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -170,6 +170,10 @@ prepare_web_server() {
prepare_zbx_web_config() {
echo "** Preparing Zabbix frontend configuration file"
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -78,9 +78,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -154,6 +154,10 @@ prepare_web_server() {
prepare_zbx_web_config() {
echo "** Preparing Zabbix frontend configuration file"
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -74,9 +74,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -166,6 +166,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -79,9 +79,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
./locale/make_mo.sh && \
mkdir -p /var/lib/locales/supported.d/ && \
rm -f /var/lib/locales/supported.d/local && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -161,6 +161,10 @@ clear_deploy() {
prepare_zbx_web_config() {
echo "** Preparing Zabbix frontend configuration file"
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -73,9 +73,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -183,6 +183,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -66,9 +66,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -183,6 +183,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -90,9 +90,11 @@ RUN set -eux && REPOLIST="rhel-8-for-x86_64-baseos-rpms,rhel-8-for-x86_64-appstr
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -260,6 +260,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -89,9 +89,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
./locale/make_mo.sh && \
mkdir -p /var/lib/locales/supported.d/ && \
rm -f /var/lib/locales/supported.d/local && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -183,6 +183,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -72,9 +72,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
chown --quiet -R zabbix:root /etc/zabbix/ /usr/share/zabbix/modules/ && \
chgrp -R 0 /etc/zabbix/ /usr/share/zabbix/modules/ && \
chmod -R g=u /etc/zabbix/ /usr/share/zabbix/modules/ && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -169,6 +169,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -66,9 +66,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -169,6 +169,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -89,9 +89,11 @@ RUN set -eux && \
rm -rf /usr/share/zabbix-${ZBX_VERSION}/ && \
cd /usr/share/zabbix/ && \
rm -f conf/zabbix.conf.php && \
rm -f conf/maintenance.inc.php && \
rm -rf tests && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
./locale/make_mo.sh && \
mkdir -p /var/lib/locales/supported.d/ && \
rm -f /var/lib/locales/supported.d/local && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}

View File

@ -169,6 +169,10 @@ prepare_zbx_web_config() {
echo "listen.group = nginx" >> "$PHP_CONFIG_FILE"
fi
export ZBX_DENY_GUI_ACCESS=${ZBX_DENY_GUI_ACCESS:-"false"}
export ZBX_GUI_ACCESS_IP_RANGE=${ZBX_GUI_ACCESS_IP_RANGE:-"['127.0.0.1']"}
export ZBX_GUI_WARNING_MSG=${ZBX_GUI_WARNING_MSG:-"Zabbix is under maintenance."}
export ZBX_MAXEXECUTIONTIME=${ZBX_MAXEXECUTIONTIME:-"600"}
export ZBX_MEMORYLIMIT=${ZBX_MEMORYLIMIT:-"128M"}
export ZBX_POSTMAXSIZE=${ZBX_POSTMAXSIZE:-"16M"}

View File

@ -189,10 +189,12 @@ RUN set -eux && REPOLIST="rhel-8-for-x86_64-baseos-rpms,rhel-8-for-x86_64-appstr
cd /tmp/ && \
rm -rf /tmp/zabbix-${ZBX_VERSION}/ && \
rm -f /usr/share/zabbix/conf/zabbix.conf.php && \
rm -f /usr/share/zabbix/conf/maintenance.inc.php && \
rm -rf /usr/share/zabbix/tests/ && \
cd /usr/share/zabbix/ && \
./locale/make_mo.sh && \
ln -s "/etc/zabbix/web/zabbix.conf.php" "/usr/share/zabbix/conf/zabbix.conf.php" && \
ln -s "/etc/zabbix/web/maintenance.inc.php" "/usr/share/zabbix/conf/maintenance.inc.php" && \
cat /usr/share/zabbix/include/locales.inc.php | grep display | grep true | awk '{$1=$1};1' | \
cut -d"'" -f 2 | sort | \
xargs -I '{}' bash -c 'echo "{}" && localedef -c -i {} -f UTF-8 {}.UTF-8 2>/dev/null' && \

View File

@ -0,0 +1,32 @@
<?php
/*
** Zabbix
** Copyright (C) 2001-2016 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
// Maintenance mode
if (getenv('ZBX_DENY_GUI_ACCESS') == 'true') {
define('ZBX_DENY_GUI_ACCESS', 1);
// IP range, who are allowed to connect to FrontEnd
$ip_range = str_replace("'","\"",getenv('ZBX_GUI_ACCESS_IP_RANGE'));
$ZBX_GUI_ACCESS_IP_RANGE = (json_decode($ip_range)) ? json_decode($ip_range) : array();
// MSG shown on Warning screen!
$_REQUEST['warning_msg'] = getenv('ZBX_GUI_WARNING_MSG');
}