summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/patches/0007-python-config-directory.patch18
1 files changed, 18 insertions, 0 deletions
diff --git a/debian/patches/0007-python-config-directory.patch b/debian/patches/0007-python-config-directory.patch
new file mode 100644
index 00000000..2ca355af
--- /dev/null
+++ b/debian/patches/0007-python-config-directory.patch
@@ -0,0 +1,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'