From b68b8c24b5919512327a69c0b8aa80244ec60897 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 25 Aug 2018 16:52:12 +0200 Subject: Really adding Adding patch from Sander Klein to fix the python config directory path. Signed-off-by: Daniel Baumann --- debian/patches/0007-python-config-directory.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 debian/patches/0007-python-config-directory.patch diff --git a/debian/patches/0007-python-config-directory.patch b/debian/patches/0007-python-config-directory.patch new file mode 100644 index 000000000..2ca355af4 --- /dev/null +++ b/debian/patches/0007-python-config-directory.patch @@ -0,0 +1,18 @@ +Author: Sander Klein +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' -- cgit v1.2.3