diff --git a/mqtt_srv.py b/mqtt_srv.py index f393a72..99738cb 100755 --- a/mqtt_srv.py +++ b/mqtt_srv.py @@ -95,15 +95,15 @@ def check_router(): cmnd = "nvram get vpn_client1_state" status, output = subprocess.getstatusoutput(cmnd) writeLog("Openvpn1 Status : " + str(output)) - stats["vpnclient1"] = output + stats["vpnclient1"] = "On" if output == 2 else "Off" cmnd = "nvram get vpn_client2_state" status, output = subprocess.getstatusoutput(cmnd) writeLog("Openvpn2 Status : " + str(output)) - stats["vpnclient2"] = output + stats["vpnclient2"] = "On" if output == 2 else "Off" cmnd = "nvram get vpn_server1_state" status, output = subprocess.getstatusoutput(cmnd) writeLog("Openvpn2 Status : " + str(output)) - stats["vpnserver1"] = output + stats["vpnserver1"] = "On" if output == 2 else "Off" cmnd = "ncat -z 192.168.77.106 25" status, output = subprocess.getstatusoutput(cmnd) if status == 0: