2023-03-25 23:47:40 +01:00
|
|
|
#!/bin/bash
|
2025-01-30 22:47:25 +01:00
|
|
|
compose_ctx="${1:?}"
|
2023-03-25 23:47:40 +01:00
|
|
|
|
2025-01-30 22:47:25 +01:00
|
|
|
chown -v '70:70' '/opt/docker-data/zabbixserver-'"${compose_ctx}"'/postgres/config/cert/'{'.ZBX_DB_CA_FILE','.ZBX_DB_CERT_FILE','.ZBX_DB_KEY_FILE'}
|
|
|
|
chmod -v '0600' '/opt/docker-data/zabbixserver-'"${compose_ctx}"'/postgres/config/cert/'{'.ZBX_DB_CA_FILE','.ZBX_DB_CERT_FILE','.ZBX_DB_KEY_FILE'}
|
2023-03-25 23:47:40 +01:00
|
|
|
if systemctl --quiet is-active docker.service; then
|
|
|
|
if [ "$( docker container inspect -f '{{.State.Running}}' 'zabbixserver-postgres-'"${compose_ctx}" )" = "true" ]; then
|
|
|
|
docker exec -t 'zabbixserver-postgres-'"${compose_ctx}" sh -c 'pg_ctl reload -s'
|
|
|
|
fi
|
|
|
|
fi
|