From 7a921b64c63413b00b50307e228776d7898f38cf Mon Sep 17 00:00:00 2001 From: root Date: Mon, 14 Jan 2019 00:42:03 +0200 Subject: [PATCH] Added ZBX_SESSION_NAME for Zabbix frontend --- agent/alpine/docker-entrypoint.sh | 9 ++++++--- agent/centos/docker-entrypoint.sh | 9 ++++++--- agent/ubuntu/docker-entrypoint.sh | 9 ++++++--- java-gateway/alpine/docker-entrypoint.sh | 9 ++++++--- java-gateway/centos/docker-entrypoint.sh | 9 ++++++--- java-gateway/ubuntu/docker-entrypoint.sh | 9 ++++++--- proxy-mysql/alpine/docker-entrypoint.sh | 9 ++++++--- proxy-mysql/centos/docker-entrypoint.sh | 9 ++++++--- proxy-mysql/ubuntu/docker-entrypoint.sh | 9 ++++++--- proxy-sqlite3/alpine/docker-entrypoint.sh | 9 ++++++--- proxy-sqlite3/centos/docker-entrypoint.sh | 9 ++++++--- proxy-sqlite3/ubuntu/docker-entrypoint.sh | 9 ++++++--- server-mysql/alpine/docker-entrypoint.sh | 9 ++++++--- server-mysql/centos/docker-entrypoint.sh | 9 ++++++--- server-mysql/ubuntu/docker-entrypoint.sh | 9 ++++++--- server-pgsql/alpine/docker-entrypoint.sh | 9 ++++++--- server-pgsql/centos/docker-entrypoint.sh | 9 ++++++--- server-pgsql/ubuntu/docker-entrypoint.sh | 9 ++++++--- web-apache-mysql/alpine/docker-entrypoint.sh | 9 ++++++--- web-apache-mysql/centos/docker-entrypoint.sh | 9 ++++++--- web-apache-mysql/ubuntu/docker-entrypoint.sh | 9 ++++++--- web-apache-pgsql/alpine/docker-entrypoint.sh | 9 ++++++--- web-apache-pgsql/centos/docker-entrypoint.sh | 9 ++++++--- web-apache-pgsql/ubuntu/docker-entrypoint.sh | 9 ++++++--- web-nginx-mysql/alpine/docker-entrypoint.sh | 9 ++++++--- web-nginx-mysql/centos/docker-entrypoint.sh | 9 ++++++--- web-nginx-mysql/ubuntu/docker-entrypoint.sh | 9 ++++++--- web-nginx-pgsql/alpine/docker-entrypoint.sh | 9 ++++++--- web-nginx-pgsql/centos/docker-entrypoint.sh | 9 ++++++--- web-nginx-pgsql/ubuntu/docker-entrypoint.sh | 9 ++++++--- zabbix-appliance/alpine/docker-entrypoint.sh | 9 ++++++--- zabbix-appliance/centos/docker-entrypoint.sh | 9 ++++++--- zabbix-appliance/rhel/docker-entrypoint.sh | 9 ++++++--- zabbix-appliance/ubuntu/docker-entrypoint.sh | 9 ++++++--- 34 files changed, 204 insertions(+), 102 deletions(-) diff --git a/agent/alpine/docker-entrypoint.sh b/agent/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/agent/alpine/docker-entrypoint.sh +++ b/agent/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/agent/centos/docker-entrypoint.sh b/agent/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/agent/centos/docker-entrypoint.sh +++ b/agent/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/agent/ubuntu/docker-entrypoint.sh b/agent/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/agent/ubuntu/docker-entrypoint.sh +++ b/agent/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/java-gateway/alpine/docker-entrypoint.sh b/java-gateway/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/java-gateway/alpine/docker-entrypoint.sh +++ b/java-gateway/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/java-gateway/centos/docker-entrypoint.sh b/java-gateway/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/java-gateway/centos/docker-entrypoint.sh +++ b/java-gateway/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/java-gateway/ubuntu/docker-entrypoint.sh b/java-gateway/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/java-gateway/ubuntu/docker-entrypoint.sh +++ b/java-gateway/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-mysql/alpine/docker-entrypoint.sh b/proxy-mysql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-mysql/alpine/docker-entrypoint.sh +++ b/proxy-mysql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-mysql/centos/docker-entrypoint.sh b/proxy-mysql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-mysql/centos/docker-entrypoint.sh +++ b/proxy-mysql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-mysql/ubuntu/docker-entrypoint.sh b/proxy-mysql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-mysql/ubuntu/docker-entrypoint.sh +++ b/proxy-mysql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-sqlite3/alpine/docker-entrypoint.sh b/proxy-sqlite3/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-sqlite3/alpine/docker-entrypoint.sh +++ b/proxy-sqlite3/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-sqlite3/centos/docker-entrypoint.sh b/proxy-sqlite3/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-sqlite3/centos/docker-entrypoint.sh +++ b/proxy-sqlite3/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/proxy-sqlite3/ubuntu/docker-entrypoint.sh b/proxy-sqlite3/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/proxy-sqlite3/ubuntu/docker-entrypoint.sh +++ b/proxy-sqlite3/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-mysql/alpine/docker-entrypoint.sh b/server-mysql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-mysql/alpine/docker-entrypoint.sh +++ b/server-mysql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-mysql/centos/docker-entrypoint.sh b/server-mysql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-mysql/centos/docker-entrypoint.sh +++ b/server-mysql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-mysql/ubuntu/docker-entrypoint.sh b/server-mysql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-mysql/ubuntu/docker-entrypoint.sh +++ b/server-mysql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-pgsql/alpine/docker-entrypoint.sh b/server-pgsql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-pgsql/alpine/docker-entrypoint.sh +++ b/server-pgsql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-pgsql/centos/docker-entrypoint.sh b/server-pgsql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-pgsql/centos/docker-entrypoint.sh +++ b/server-pgsql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/server-pgsql/ubuntu/docker-entrypoint.sh b/server-pgsql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/server-pgsql/ubuntu/docker-entrypoint.sh +++ b/server-pgsql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-mysql/alpine/docker-entrypoint.sh b/web-apache-mysql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-mysql/alpine/docker-entrypoint.sh +++ b/web-apache-mysql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-mysql/centos/docker-entrypoint.sh b/web-apache-mysql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-mysql/centos/docker-entrypoint.sh +++ b/web-apache-mysql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-mysql/ubuntu/docker-entrypoint.sh b/web-apache-mysql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-mysql/ubuntu/docker-entrypoint.sh +++ b/web-apache-mysql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-pgsql/alpine/docker-entrypoint.sh b/web-apache-pgsql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-pgsql/alpine/docker-entrypoint.sh +++ b/web-apache-pgsql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-pgsql/centos/docker-entrypoint.sh b/web-apache-pgsql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/web-apache-pgsql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-apache-pgsql/ubuntu/docker-entrypoint.sh b/web-apache-pgsql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-apache-pgsql/ubuntu/docker-entrypoint.sh +++ b/web-apache-pgsql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-mysql/alpine/docker-entrypoint.sh b/web-nginx-mysql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-mysql/centos/docker-entrypoint.sh b/web-nginx-mysql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/web-nginx-mysql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/web-nginx-mysql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-pgsql/alpine/docker-entrypoint.sh b/web-nginx-pgsql/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-pgsql/centos/docker-entrypoint.sh b/web-nginx-pgsql/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/zabbix-appliance/alpine/docker-entrypoint.sh b/zabbix-appliance/alpine/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/zabbix-appliance/alpine/docker-entrypoint.sh +++ b/zabbix-appliance/alpine/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/zabbix-appliance/centos/docker-entrypoint.sh b/zabbix-appliance/centos/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/zabbix-appliance/centos/docker-entrypoint.sh +++ b/zabbix-appliance/centos/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/zabbix-appliance/rhel/docker-entrypoint.sh b/zabbix-appliance/rhel/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/zabbix-appliance/rhel/docker-entrypoint.sh +++ b/zabbix-appliance/rhel/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() { diff --git a/zabbix-appliance/ubuntu/docker-entrypoint.sh b/zabbix-appliance/ubuntu/docker-entrypoint.sh index e763b825f..ccaa4b38b 100755 --- a/zabbix-appliance/ubuntu/docker-entrypoint.sh +++ b/zabbix-appliance/ubuntu/docker-entrypoint.sh @@ -827,13 +827,14 @@ prepare_zbx_web_config() { echo "** Preparing Zabbix frontend configuration file" + ZBX_WWW_ROOT="/usr/share/zabbix" ZBX_WEB_CONFIG="$ZABBIX_ETC_DIR/web/zabbix.conf.php" - if [ -f "/usr/share/zabbix/conf/zabbix.conf.php" ]; then - rm -f "/usr/share/zabbix/conf/zabbix.conf.php" + if [ -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" ]; then + rm -f "$ZBX_WWW_ROOT/conf/zabbix.conf.php" fi - ln -s "$ZBX_WEB_CONFIG" "/usr/share/zabbix/conf/zabbix.conf.php" + ln -s "$ZBX_WEB_CONFIG" "$ZBX_WWW_ROOT/conf/zabbix.conf.php" # Different places of PHP configuration file if [ -f "/etc/php5/conf.d/99-zabbix.ini" ]; then @@ -891,6 +892,8 @@ prepare_zbx_web_config() { "$ZBX_WEB_CONFIG" [ "$db_type" = "postgresql" ] && sed -i "s/MYSQL/POSTGRESQL/g" "$ZBX_WEB_CONFIG" + + sed "/ZBX_SESSION_NAME/s/'[^']*'/'${ZBX_SESSION_NAME}'/2" "$ZBX_WWW_ROOT/include/defines.inc.php" } prepare_zbx_agent_config() {