Browse Source

fastd-version only if mesh-vpn definied

thx to kb-light
Sunz3r 7 years ago
parent
commit
ab4b87dc27
1 changed files with 8 additions and 7 deletions
  1. 8 7
      ext-respondd.py

+ 8 - 7
ext-respondd.py

@@ -338,13 +338,14 @@ def createNodeinfo():
         "location": {},
     }
 
-    try:
-      j["software"]["fastd"] = {
-          "version": call(['fastd','-v'])[0].split(' ')[1],
-          "enabled": True,
-      };
-    except:
-        pass
+    if 'mesh-vpn' in config and len(config["mesh-vpn"]) > 0:
+        try:
+          j["software"]["fastd"] = {
+              "version": call(['fastd','-v'])[0].split(' ')[1],
+              "enabled": True,
+          };
+        except:
+            pass
 
     return merge(j, aliases["nodeinfo"])