Skip to content

Commit

Permalink
www: merge stats and tools
Browse files Browse the repository at this point in the history
  • Loading branch information
cremesk committed Nov 11, 2024
1 parent 1039a99 commit 5934748
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 20 deletions.
19 changes: 0 additions & 19 deletions salt/freifunk/base/ddmesh/var/www_freifunk/04-stats.sh

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Show Tools only for internal FFDD-Network clients
# Show Stats and Tools only for internal FFDD-Network clients

# FFDD-Network
ALLOWED_IP="10.200.0.0/15"
Expand All @@ -13,6 +13,14 @@ hostname_short="$(cat /etc/hostname | awk -F'.' '{print $1}')"

# exclude network != FFDD-Network and NAT'ed Rules from ipX/nodeX.freifunk-dresden.de
if [ "$?" -eq 0 ] && [ "$IP" != '10.200.0.1' ]; then
# stats
cat <<-EOM
<TR><TD><BIG CLASS="plugin">Statistik</BIG></TD></TR>
<TR><TD><DIV CLASS="plugin"><A CLASS="plugin" TARGET="_blank" HREF="/bind_stats">DNS Stats</A></DIV></TD></TR>
<TR><TD><DIV CLASS="plugin"><A CLASS="plugin" TARGET="_blank" HREF="/monitorix">Monitorix</A></DIV></TD></TR>
EOM

# tools
if [ "$(uci -qX get ffdd.sys.apache_ddos_prevent)" -eq '0' ]; then
cat <<-EOM
<TR><TD><BIG CLASS="plugin">Tools</BIG></TD></TR>
Expand Down

0 comments on commit 5934748

Please sign in to comment.