We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e94939f commit 842e03dCopy full SHA for 842e03d
files/usr/sbin/print_map.sh
@@ -60,7 +60,7 @@ print_basic() {
60
echo -n '], '
61
62
mac=$(uci -q get network.freifunk.macaddr)
63
- echo -n "\"clientcount\" : $(batctl translocal 2> /dev/null | grep -c 'W')"
+ echo -n "$(batctl translocal 2> /dev/null | tr '\t/[]()' ' ' | awk -v mac=$mac 'BEGIN{ c=0; } { if($1 != mac && $3 ~ /^[.NW]+$/ && $4 < 300) c++;} END{ printf("\"clientcount\" : %d", c);}')"
64
}
65
66
print_more() {
0 commit comments