From 86b653b55de93c9026f758f2231d3c25c1e591df Mon Sep 17 00:00:00 2001 From: virtubox Date: Sun, 21 Jul 2019 16:52:50 +0200 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'netdata.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- netdata.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/netdata.sh b/netdata.sh index 5809300..0c4dd61 100644 --- a/netdata.sh +++ b/netdata.sh @@ -41,7 +41,10 @@ if [ -n "$(command -v mysqladmin)" ]; then MYSQL_PWD=$(cat /etc/psa/.psa.shadow) mysql -uadmin -e "grant usage on *.* to 'netdata'@'localhost';" MYSQL_PWD=$(cat /etc/psa/.psa.shadow) mysql -uadmin -e "flush privileges;" echo "Updating Netdata configuration for Apache monitoring" - sed -i 's/http:\/\/localhost\/server-status?auto/http:\/\/localhost:7080\/server-status?auto/' /usr/lib/netdata/conf.d/python.d/apache.conf + if [ -d /etc/netdata ]; then + sed -i 's/http:\/\/localhost\/server-status?auto/http:\/\/localhost:7080\/server-status?auto/' /usr/lib/netdata/conf.d/python.d/apache.conf + cp /usr/lib/netdata/conf.d/python.d/apache.conf /etc/netdata/python.d/apache.conf -f + fi fi # installing required python package for mysql monitoring apt-get update -qq &&