From e3df4720f83ea269e7e6a0d768e7bf2b5860bb13 Mon Sep 17 00:00:00 2001 From: Christian Dresel Date: Sun, 5 Jan 2020 10:13:41 +0100 Subject: [PATCH] fff-webui: show fastd public key in webui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit User can see the fastd public key in the webui Signed-off-by: Christian Dresel Reviewed-by: Robert Langhammer Reviewed-by: Fabian Bläse --- src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html index f18a3b4b..eda5d151 100755 --- a/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html +++ b/src/packages/fff/fff-web/files/www/ssl/cgi-bin/home.html @@ -46,6 +46,10 @@ else internet_active="Nein" fi +if ! fastd_pub=$(echo "secret \"$(uci -q get fastd.fff.secret)\";" | fastd -c - --show-key --machine-readable); then + fastd_pub="-" +fi + %> +
@@ -58,6 +62,7 @@ fi
Bekannte Knoten:<%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %>
Nachbarknoten:<%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %>
VPN via fastd:<%= ${vpn_active} %>
fastd public key:<%= ${fastd_pub} %>
Laufzeit:<%= ${uptime} %>
Auslastung:<%= ${load} %>
Uhrzeit:<% date %>