summaryrefslogtreecommitdiffstats
path: root/debian/patches/0007-python-config-directory.patch
blob: 2ca355af4bf6e2ccd882c8fee7e8b27d031ec005 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Author: Sander Klein <debian-bugs@roedie.nl>
Description:
 Since the config is expected to be located in  /etc/netdata it is kind
 of silly to use ../../../../ to get to the right path. Moreover it
 breaks netdata on Debian.

diff -Naurp netdata.orig/plugins.d/python.d.plugin netdata/plugins.d/python.d.plugin
--- netdata.orig/plugins.d/python.d.plugin
+++ netdata/plugins.d/python.d.plugin
@@ -21,7 +21,7 @@ except ImportError:
     from time import time
 
 PY_VERSION = version_info[:2]
-PLUGIN_CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', os.path.dirname(__file__) + '/../../../../etc/netdata') + '/'
+PLUGIN_CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', '/etc/netdata') + '/'
 CHARTS_PY_DIR = os.path.abspath(os.getenv('NETDATA_PLUGINS_DIR', os.path.dirname(__file__)) + '/../python.d') + '/'
 CHARTS_PY_CONFIG_DIR = PLUGIN_CONFIG_DIR + 'python.d/'
 PYTHON_MODULES_DIR = CHARTS_PY_DIR + 'python_modules'