Skip to content

Commit

Permalink
fix Bug 65410 - Disable ds:metrics service when METRICS_ENABLED=false (
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk authored Apr 10, 2024
1 parent 3fe861b commit 12eb20a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/supervisor/ds/ds-metrics.conf
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ stdout_logfile_maxbytes=0
stderr_logfile=/var/log/COMPANY_NAME/documentserver/metrics/err.log
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=true
autorestart=true
autostart=false
autorestart=false
2 changes: 2 additions & 0 deletions run-document-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ DS_LOG_DIR="${LOG_DIR}/documentserver"
LIB_DIR="/var/lib/${COMPANY_NAME}"
DS_LIB_DIR="${LIB_DIR}/documentserver"
CONF_DIR="/etc/${COMPANY_NAME}/documentserver"
SUPERVISOR_CONF_DIR="/etc/supervisor/conf.d"
IS_UPGRADE="false"

ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false}
Expand Down Expand Up @@ -275,6 +276,7 @@ update_statsd_settings(){
${JSON} -I -e "this.statsd.host = '${METRICS_HOST}'"
${JSON} -I -e "this.statsd.port = '${METRICS_PORT}'"
${JSON} -I -e "this.statsd.prefix = '${METRICS_PREFIX}'"
sed -i -E "s/(autostart|autorestart)=.*$/\1=${METRICS_ENABLED}/g" ${SUPERVISOR_CONF_DIR}/ds-metrics.conf
}

update_db_settings(){
Expand Down

0 comments on commit 12eb20a

Please sign in to comment.