Zabbix web-interface maintenance mode support

This commit is contained in:
Alexey Pustovalov 2020-09-11 05:01:22 -04:00
parent 434dcc7866
commit 8f3092b493
37 changed files with 459 additions and 0 deletions

View File

@ -9,3 +9,6 @@ ZBX_SERVER_NAME=Composed installation
# ZBX_MAXINPUTTIME=300
# 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

@ -77,9 +77,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/ && \
chgrp -R 0 /etc/zabbix/ && \
chmod -R g=u /etc/zabbix/ && \

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

@ -146,6 +146,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

@ -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

@ -146,6 +146,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" && \
./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

@ -146,6 +146,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

@ -76,9 +76,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/ && \
chgrp -R 0 /etc/zabbix/ && \
chmod -R g=u /etc/zabbix/ && \

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

@ -143,6 +143,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

@ -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

@ -143,6 +143,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" && \
./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

@ -143,6 +143,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

@ -71,9 +71,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/ && \
chgrp -R 0 /etc/zabbix/ && \
chmod -R g=u /etc/zabbix/ && \

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

@ -159,6 +159,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

@ -62,9 +62,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

@ -159,6 +159,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

@ -88,9 +88,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

@ -159,6 +159,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

@ -70,9 +70,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/ && \
chgrp -R 0 /etc/zabbix/ && \
chmod -R g=u /etc/zabbix/ && \

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

@ -155,6 +155,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

@ -62,9 +62,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

@ -155,6 +155,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

@ -88,9 +88,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

@ -155,6 +155,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"}