Skip to content

Commit 842e03d

Browse files
authored
Update print_map.sh
1 parent e94939f commit 842e03d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

files/usr/sbin/print_map.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ print_basic() {
6060
echo -n '], '
6161

6262
mac=$(uci -q get network.freifunk.macaddr)
63-
echo -n "\"clientcount\" : $(batctl translocal 2> /dev/null | grep -c 'W')"
63+
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);}')"
6464
}
6565

6666
print_more() {

0 commit comments

Comments
 (0)