Skip to content

Commit

Permalink
Added ZBX_SESSION_NAME for Zabbix frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jan 13, 2019
1 parent c8421dd commit 55eb398
Show file tree
Hide file tree
Showing 34 changed files with 204 additions and 102 deletions.
9 changes: 6 additions & 3 deletions agent/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions agent/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions agent/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions java-gateway/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions java-gateway/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions java-gateway/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-mysql/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-sqlite3/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-sqlite3/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions proxy-sqlite3/ubuntu/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions server-mysql/alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
9 changes: 6 additions & 3 deletions server-mysql/centos/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -826,13 +826,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
Expand Down Expand Up @@ -890,6 +891,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() {
Expand Down
Loading

0 comments on commit 55eb398

Please sign in to comment.