From 4fe654d7704499063ec6d766faf3249149cac7a3 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Wed, 17 Apr 2024 19:41:14 +0200 Subject: [PATCH] wireguard.cgi: Show visual status when disconected Signed-off-by: Michael Tremer --- html/cgi-bin/wireguard.cgi | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/html/cgi-bin/wireguard.cgi b/html/cgi-bin/wireguard.cgi index f319954cc..af4ea1551 100644 --- a/html/cgi-bin/wireguard.cgi +++ b/html/cgi-bin/wireguard.cgi @@ -188,6 +188,7 @@ END # WireGuard performs a handshake very two minutes, so we should be considered online then my $is_connected = (time - $status->{"latest-handshake"}) <= 120; + # We are connected! if ($is_connected) { push(@status, "is-connected"); @@ -209,6 +210,10 @@ END EOF } } + + # We are not connected... + } else { + push(@status, "is-disconnected"); } print <