]> arthur.barton.de Git - netdata.git/commitdiff
fixed env vars handling
authorpaulfantom <paulfantom@gmail.com>
Mon, 20 Jun 2016 12:07:46 +0000 (14:07 +0200)
committerpaulfantom <paulfantom@gmail.com>
Mon, 20 Jun 2016 12:07:46 +0000 (14:07 +0200)
plugins.d/python.d.plugin

index 6d04023b74679211292306c3748c0711579c095a..e6131a50001a0a2f3e98b8d774c468ee8498d3c2 100755 (executable)
@@ -10,12 +10,13 @@ import time
 # setup environment
 # https://github.com/firehol/netdata/wiki/External-Plugins#environment-variables
 MODULES_DIR = os.getenv('NETDATA_PLUGINS_DIR',
-                        os.path.abspath(__file__).strip("python.d.plugin.py").replace("plugins.d", "python.d"))
+                        os.path.abspath(__file__).strip("python.d.plugin.py").replace("plugins.d", ""))
 CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', "/etc/netdata/")
 INTERVAL = os.getenv('NETDATA_UPDATE_EVERY', None)
 # directories should end with '/'
 if MODULES_DIR[-1] != "/":
     MODULES_DIR += "/"
+MODULES_DIR += "python.d/"
 if CONFIG_DIR[-1] != "/":
     CONFIG_DIR += "/"
 sys.path.append(MODULES_DIR + "python_modules")