mirror of
https://github.com/zabbix/zabbix-docker.git
synced 2025-01-08 23:00:10 +01:00
Fixed escaping for DB certs in web images
This commit is contained in:
parent
a02ebfc680
commit
59749e683c
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
|||||||
zbx_env/
|
zbx_env/
|
||||||
zbx_env*/
|
zbx_env*/
|
||||||
|
.*CERT_FILE
|
||||||
|
.*KEY_FILE
|
||||||
|
.*CA_FILE
|
||||||
|
@ -220,6 +220,10 @@ prepare_zbx_web_config() {
|
|||||||
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
||||||
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
||||||
|
|
||||||
|
ZBX_DB_KEY_FILE=$(escape_spec_char "${ZBX_DB_KEY_FILE}")
|
||||||
|
ZBX_DB_CERT_FILE=$(escape_spec_char "${ZBX_DB_CERT_FILE}")
|
||||||
|
ZBX_DB_CA_FILE=$(escape_spec_char "${ZBX_DB_CA_FILE}")
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
||||||
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
||||||
|
@ -222,6 +222,10 @@ prepare_zbx_web_config() {
|
|||||||
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
||||||
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
||||||
|
|
||||||
|
ZBX_DB_KEY_FILE=$(escape_spec_char "${ZBX_DB_KEY_FILE}")
|
||||||
|
ZBX_DB_CERT_FILE=$(escape_spec_char "${ZBX_DB_CERT_FILE}")
|
||||||
|
ZBX_DB_CA_FILE=$(escape_spec_char "${ZBX_DB_CA_FILE}")
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
||||||
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
||||||
|
@ -248,6 +248,10 @@ prepare_zbx_web_config() {
|
|||||||
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
||||||
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
||||||
|
|
||||||
|
ZBX_DB_KEY_FILE=$(escape_spec_char "${ZBX_DB_KEY_FILE}")
|
||||||
|
ZBX_DB_CERT_FILE=$(escape_spec_char "${ZBX_DB_CERT_FILE}")
|
||||||
|
ZBX_DB_CA_FILE=$(escape_spec_char "${ZBX_DB_CA_FILE}")
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
||||||
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
||||||
|
@ -248,6 +248,10 @@ prepare_zbx_web_config() {
|
|||||||
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
server_user=$(escape_spec_char "${DB_SERVER_ZBX_USER}")
|
||||||
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
server_pass=$(escape_spec_char "${DB_SERVER_ZBX_PASS}")
|
||||||
|
|
||||||
|
ZBX_DB_KEY_FILE=$(escape_spec_char "${ZBX_DB_KEY_FILE}")
|
||||||
|
ZBX_DB_CERT_FILE=$(escape_spec_char "${ZBX_DB_CERT_FILE}")
|
||||||
|
ZBX_DB_CA_FILE=$(escape_spec_char "${ZBX_DB_CA_FILE}")
|
||||||
|
|
||||||
sed -i \
|
sed -i \
|
||||||
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
-e "s/{DB_SERVER_HOST}/${DB_SERVER_HOST}/g" \
|
||||||
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
-e "s/{DB_SERVER_PORT}/${DB_SERVER_PORT}/g" \
|
||||||
|
Loading…
Reference in New Issue
Block a user