Files
zabbix-docker/templates/entrypoints/proxy-sqlite3.sh
Alexey Pustovalov b8fed86d78
Some checks failed
Build images (DockerHub) / Initialize build (push) Has been cancelled
Build images (DockerHub) / Build base on ${{ matrix.os }} (push) Has been cancelled
Build images (DockerHub) / Build ${{ matrix.build }} base on ${{ matrix.os }} (push) Has been cancelled
Build images (DockerHub) / Build ${{ matrix.build }} on ${{ matrix.os }} (push) Has been cancelled
Build images (RedHat) / Initialize build (push) Has been cancelled
Build images (RedHat) / Build ${{ matrix.build }} base (${{ matrix.arch }}) (push) Has been cancelled
Build images (RedHat) / Build ${{ matrix.build }} image (${{ matrix.arch }}) (push) Has been cancelled
Build images (RedHat) / Clear images cache (${{ matrix.arch }}) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
SonarCloud analysis / Analysis (push) Has been cancelled
Prepare to remove supervisord
2026-04-13 21:28:21 +09:00

46 lines
1.0 KiB
Bash

#!/usr/bin/env bash
set -euo pipefail
readonly ENTRYPOINT_LIBS="/usr/lib/docker-entrypoint"
source "${ENTRYPOINT_LIBS}/bootstrap.sh"
source "${ENTRYPOINT_LIBS}/proxy-config.sh"
update_config() {
: "${ZBX_USE_NODE_NAME_AS_DB_NAME:=false}"
if [ "${ZBX_USE_NODE_NAME_AS_DB_NAME,,}" = "true" ]; then
local node_name
node_name="$(uname -n)"
export ZBX_DB_NAME="${ZABBIX_USER_HOME_DIR}/db_data/${node_name}.sqlite"
else
export ZBX_DB_NAME="${ZABBIX_USER_HOME_DIR}/db_data/${ZBX_HOSTNAME:-zabbix-proxy-sqlite3}.sqlite"
fi
unset ZBX_USE_NODE_NAME_AS_DB_NAME
proxy_config
}
prepare_service() {
info "** Preparing Zabbix proxy"
update_config
clear_zbx_env
}
#################################################
if [ $# -eq 0 ]; then
set -- /usr/sbin/zabbix_proxy
elif [ "${1#-}" != "$1" ]; then
set -- /usr/sbin/zabbix_proxy "$@"
fi
if [ "${1:-}" = '/usr/sbin/zabbix_proxy' ]; then
prepare_service
fi
exec "$@"
#################################################