fixed env vars handling
paulfantom committed
Jun 20, 2016 at 14:07 UTC
df2e2967ff2fdf5b32fde21f9e7e3aef1ff5c1ff
1 file changed
+2
-1
plugins.d/python.d.plugin
+2
-1
@@ -10,12 +10,13 @@ import time
10
# setup environment
11
# https://github.com/firehol/netdata/wiki/External-Plugins#environment-variables
12
MODULES_DIR = os.getenv('NETDATA_PLUGINS_DIR',
13
- os.path.abspath(__file__).strip("python.d.plugin.py").replace("plugins.d", "python.d"))
13
+ os.path.abspath(__file__).strip("python.d.plugin.py").replace("plugins.d", ""))
14
CONFIG_DIR = os.getenv('NETDATA_CONFIG_DIR', "/etc/netdata/")
15
INTERVAL = os.getenv('NETDATA_UPDATE_EVERY', None)
16
# directories should end with '/'
17
if MODULES_DIR[-1] != "/":
18
MODULES_DIR += "/"
19
+MODULES_DIR += "python.d/"
20
if CONFIG_DIR[-1] != "/":
21
CONFIG_DIR += "/"
22
sys.path.append(MODULES_DIR + "python_modules")