fff-web-ui: fix redirection of stderr

The stderr of batctl should be redirected.

In a row of pipes a redirection at the end will only redirect the output of the last command! Put it on the right place.

It's just shell grammar.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
Reviewed-by: Christian Dresel <freifunk@dresel.systems>
This commit is contained in:
Robert Langhammer 2022-04-17 00:31:42 +02:00 committed by Fabian Bläse
parent a62f7cdf96
commit e6efc9671a
2 changed files with 4 additions and 4 deletions

View File

@ -61,8 +61,8 @@ contact="$(uci -q get "fff.system.contact")"
<legend>Status</legend>
<table>
<tr><th>Hood:</th><td><% echo "$hood" %></td></tr>
<tr><th>Bekannte Knoten:</th><td><% echo -n $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2> /dev/null)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><% echo -n $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2> /dev/null) %></td></tr>
<tr><th>Bekannte Knoten:</th><td><% echo -n $(($(batctl tg -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><% echo -n $(batctl o -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l) %></td></tr>
<tr><th>Lokale Clients:</th><td><% echo -n $(batctl tl -H 2> /dev/null | grep -c 'W') %></td></tr>
</table>
</fieldset>

View File

@ -59,8 +59,8 @@ fi
<tr><th>Name:</th><td><%= ${HOSTNAME} %></td></tr>
<tr><th>Modell:</th><td><% cat /tmp/sysinfo/model 2>/dev/null %></td></tr>
<tr><th>MAC-Adresse:</th><td><%= $(cat /sys/class/net/br-client/address) %></td></tr>
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H | cut -b 40-56 | sort | uniq | wc -l 2>/dev/null) %></td></tr>
<tr><th>Bekannte Knoten:</th><td><%= $(($(batctl tg -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l)+1)) %></td></tr>
<tr><th>Nachbarknoten:</th><td><%= $(batctl o -H 2>/dev/null | cut -b 40-56 | sort | uniq | wc -l) %></td></tr>
<tr><th>VPN via fastd:</th><td><%= ${vpn_active} %></td></tr>
<tr><th>fastd public key:</th><td><%= ${fastd_pub} %></td></tr>
<tr><th>Laufzeit:</th><td><%= ${uptime} %></td></tr>