Explorar o código

fastd-version only if mesh-vpn definied

thx to kb-light
Sunz3r %!s(int64=7) %!d(string=hai) anos
pai
achega
ab4b87dc27
Modificáronse 1 ficheiros con 8 adicións e 7 borrados
  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"])