diff --git a/manifest.toml b/manifest.toml index 1031af3..d70f9e0 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Grafana" description.en = "Metric & analytic dashboards for monitoring" description.fr = "Tableaux de bord de supervision" -version = "10.2.3~ynh1" +version = "10.2.3~ynh2" maintainers = ["JimboJoe"] diff --git a/scripts/install b/scripts/install index 1e63b68..90899d6 100644 --- a/scripts/install +++ b/scripts/install @@ -25,10 +25,10 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=30 # If NetData is installed, configure it to feed InfluxDB -if [ -d "/opt/netdata/etc/netdata" ] ; then - netdata_conf="/opt/netdata/etc/netdata/exporting.conf" +if [ -d "/var/www/netdata/etc/netdata" ] ; then + netdata_conf="/var/www/netdata/etc/netdata/exporting.conf" if [ ! -f "$netdata_conf" ] ; then - cp "/opt/netdata/usr/lib/netdata/conf.d/exporting.conf" /opt/netdata/etc/netdata + cp "/var/www/netdata/usr/lib/netdata/conf.d/exporting.conf" /var/www/netdata/etc/netdata fi sed -i '/^\[exporting:global\]$/,/^\[/ { s/enabled = no/enabled = yes/ diff --git a/scripts/remove b/scripts/remove index 29bd105..e24dabd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -39,7 +39,7 @@ ynh_remove_nginx_config ynh_script_progression --message="Removing various files..." # If NetData is installed, configure it not to feed InfluxDB any more -netdata_conf="/opt/netdata/etc/netdata/exporting.conf" +netdata_conf="/var/www/netdata/etc/netdata/exporting.conf" if [[ -f "$netdata_conf" ]] ; then sed -i '/^\[exporting:global\]$/,/^\[/ { s/enabled = yes/enabled = no/ diff --git a/scripts/upgrade b/scripts/upgrade index 86d3d6d..9e870ee 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -40,10 +40,10 @@ ynh_add_nginx_config ynh_script_progression --message="Configuring Grafana and InfluxDB..." --weight=3 # If NetData is installed, configure it to feed InfluxDB -if [ -d "/opt/netdata" ] ; then - netdata_conf="/opt/netdata/etc/netdata/exporting.conf" +if [ -d "/var/www/netdata" ] ; then + netdata_conf="/var/www/netdata/etc/netdata/exporting.conf" if [ ! -f $netdata_conf ] ; then - cp /opt/netdata/usr/lib/netdata/conf.d/exporting.conf $netdata_conf + cp /var/www/netdata/usr/lib/netdata/conf.d/exporting.conf $netdata_conf fi sed -i '/^\[exporting:global\]$/,/^\[/ { s/enabled = no/enabled = yes/ @@ -67,7 +67,7 @@ EOF fi # Remove obsolete NetData backend if in use - netdata_conf="/opt/netdata/etc/netdata/netdata.conf" + netdata_conf="/var/www/netdata/etc/netdata/netdata.conf" if [ -f "$netdata_conf" ] ; then # If there is already a [backend] section if [ -n "$(cat $netdata_conf | grep '\[backend\]')" ] ; then