From 94cc1787bd1c81aea59ecd6a213b07ec8f2412d9 Mon Sep 17 00:00:00 2001 From: Jimmy Monin Date: Sun, 23 Jun 2019 09:37:03 +0200 Subject: [PATCH] Adapt to new configuration folder structure --- scripts/_common.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/_common.sh b/scripts/_common.sh index d096828..24a7f77 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -51,6 +51,9 @@ touch /opt/netdata/etc/netdata/.opt-out-from-anonymous-statistics # Add a web_log entry for every YunoHost domain netdata_add_yunohost_web_logs () { local web_log_file="/opt/netdata/etc/netdata/python.d/web_log.conf" + if [ ! -f $web_log_file ] ; then + cp /opt/netdata/etc/netdata/orig/python.d/web_log.conf $web_log_file + fi if [ -z "$(grep "YUNOHOST" $web_log_file)" ] ; then echo "# ------------YUNOHOST DOMAINS---------------" >> $web_log_file for domain in $(yunohost domain list --output-as plain); do @@ -67,8 +70,12 @@ EOF # If PostgreSQL is installed, add a PostgreSQL entry using instance password netdata_add_yunohost_postgres_configuration () { - if [ -f /etc/yunohost/psql ] && [ -z "$(grep "yunohost:" /opt/netdata/etc/netdata/python.d/postgres.conf)" ] ; then - cat >> /opt/netdata/etc/netdata/python.d/postgres.conf <> $postgres_file <