Fixed formatting

This commit is contained in:
Alexey Pustovalov 2026-03-31 17:26:52 +09:00
parent 7b490f1af6
commit 816adfe69b
24 changed files with 93 additions and 111 deletions

View file

@ -50,7 +50,7 @@ RUN set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl \
jq \
jq \
mariadb-client \
mariadb-connector-c \
apache2 \

View file

@ -142,7 +142,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -152,16 +151,16 @@ get_vault_secrets() {
fi
DB_SERVER_ZBX_USER="$(printf '%s' "$vaultdata" | jq -r '.data.data.username')"
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -200,8 +199,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... ******"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -211,7 +210,7 @@ check_db_connect() {
while [ ! "$(mariadb-admin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --skip-ssl-verify-server-cert --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -142,7 +142,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -154,14 +153,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -200,8 +199,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -211,7 +210,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -142,7 +142,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -154,14 +153,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -200,8 +199,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -211,7 +210,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -142,7 +142,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -154,14 +153,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -200,8 +199,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -211,7 +210,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -50,6 +50,7 @@ RUN set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl \
jq \
apache2 \
apache2-proxy \
php84-bcmath \
@ -70,7 +71,6 @@ RUN set -eux && \
php84-xmlwriter \
php84-openssl \
postgresql17-client \
jq \
supervisor" && \
apk add \
--no-cache \

View file

@ -123,7 +123,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -135,14 +134,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -185,8 +184,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -208,7 +207,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -123,7 +123,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -135,14 +134,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -185,8 +184,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -208,7 +207,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -123,7 +123,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -135,14 +134,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -185,8 +184,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... ******"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -208,7 +207,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -123,7 +123,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -135,14 +134,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -185,8 +184,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -208,7 +207,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -50,6 +50,7 @@ RUN set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl \
jq \
mariadb-client \
mariadb-connector-c \
nginx \
@ -70,7 +71,6 @@ RUN set -eux && \
php84-xmlreader \
php84-xmlwriter \
php84-openssl \
jq \
supervisor" && \
apk add \
--no-cache \

View file

@ -148,7 +148,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -160,14 +159,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -206,8 +205,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -217,7 +216,7 @@ check_db_connect() {
while [ ! "$(mariadb-admin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --skip-ssl-verify-server-cert --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -148,7 +148,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -160,14 +159,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -206,8 +205,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -217,7 +216,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -148,7 +148,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -160,14 +159,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -206,8 +205,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -217,7 +216,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -70,6 +70,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
curl-minimal \
jq \
supervisor \
shadow-utils \
findutils \
@ -85,7 +86,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
php-ldap \
php-mbstring \
php-mysqlnd \
jq \
php-xml" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \

View file

@ -148,7 +148,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -160,14 +159,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -206,8 +205,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -217,7 +216,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -148,7 +148,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -160,14 +159,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -206,8 +205,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -217,7 +216,7 @@ check_db_connect() {
while [ ! "$(mysqladmin ping $mysql_connect_args -u ${DB_SERVER_ZBX_USER} \
--silent --connect_timeout=10 $ssl_opts)" ]; do
echo "**** MySQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** MySQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -50,6 +50,7 @@ RUN set -eux && \
INSTALL_PKGS="bash \
tzdata \
curl \
jq \
nginx \
php84-bcmath \
php84-ctype \
@ -69,7 +70,6 @@ RUN set -eux && \
php84-xmlwriter \
php84-openssl \
postgresql17-client \
jq \
supervisor" && \
apk add \
--no-cache \

View file

@ -129,7 +129,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -148,7 +147,7 @@ get_vault_secrets() {
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -191,8 +190,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi

View file

@ -129,7 +129,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -141,14 +140,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -215,7 +214,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -129,7 +129,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -141,14 +140,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -191,8 +190,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -215,7 +214,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -71,6 +71,7 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
set -eux && \
INSTALL_PKGS="bash \
curl-minimal \
jq \
supervisor \
shadow-utils \
findutils \
@ -86,7 +87,6 @@ RUN --mount=type=tmpfs,target=/var/lib/dnf/ \
php-ldap \
php-mbstring \
php-pgsql \
jq \
php-xml" && \
curl --tlsv1.2 -sSf -L https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm -o /tmp/epel-release-latest-10.noarch.rpm && \
rpm -ivh /tmp/epel-release-latest-10.noarch.rpm && \

View file

@ -129,7 +129,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -141,14 +140,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -191,8 +190,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -215,7 +214,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done

View file

@ -129,7 +129,6 @@ get_vault_secrets() {
if [ "${ZBX_VAULT}" == "HashiCorp" ]; then
while ! vaultdata="$(curl "${curl_opts[@]}" -H "X-Vault-Token: $VAULT_TOKEN" "$vault_url")"; do
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
echo "CURL command: curl ${curl_opts[*]} -H \"X-Vault-Token: $VAULT_TOKEN\" \"$vault_url\""
sleep $WAIT_TIMEOUT
done
errors=$(printf '%s' "$vaultdata" | jq -r '.errors // empty')
@ -141,14 +140,14 @@ get_vault_secrets() {
DB_SERVER_ZBX_PASS="$(printf '%s' "$vaultdata" | jq -r '.data.data.password')"
elif [ "${ZBX_VAULT}" == "CyberArk" ]; then
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
cyberark_opts=(-H "Content-type: application/json" --cert "$ZBX_VAULTCERTFILE")
# if key is defined use it
if [ -n "${ZBX_VAULTKEYFILE}" ]; then
cyberark_opts+=(--key "$ZBX_VAULTKEYFILE")
fi
while ! vaultdata=$(curl "${curl_opts[@]}" "${cyberark_opts[@]}" "$vault_url") ; do
echo "**** Vault is not available. Waiting 5 seconds... ****"
echo "**** Vault is not available. Waiting ${WAIT_TIMEOUT} seconds... ****"
sleep $WAIT_TIMEOUT
done
@ -191,8 +190,8 @@ check_db_connect() {
unset DB_SERVER_ZBX_USER
unset DB_SERVER_ZBX_PASS
echo "*************** Connecting to vault... ***************************************"
echo "*************** VAULT URL: $ZBX_VAULTURL"
echo "***** Connecting to vault... *****"
echo "***** VAULT URL: $ZBX_VAULTURL"
get_vault_secrets
fi
@ -215,7 +214,7 @@ check_db_connect() {
fi
while [ ! "$(psql $psql_connect_args --username ${DB_SERVER_ZBX_USER} --dbname ${DB_SERVER_DBNAME} --list --quiet 2>/dev/null)" ]; do
echo "**** PostgreSQL server is not available. Waiting $WAIT_TIMEOUT seconds..."
echo "**** PostgreSQL server is not available. Waiting ${WAIT_TIMEOUT} seconds..."
sleep $WAIT_TIMEOUT
done