diff --git a/salt/freifunk/base/ddmesh/var/www_freifunk/05-tools.sh b/salt/freifunk/base/ddmesh/var/www_freifunk/04-additional.sh similarity index 64% rename from salt/freifunk/base/ddmesh/var/www_freifunk/05-tools.sh rename to salt/freifunk/base/ddmesh/var/www_freifunk/04-additional.sh index df16e541..4fda7240 100755 --- a/salt/freifunk/base/ddmesh/var/www_freifunk/05-tools.sh +++ b/salt/freifunk/base/ddmesh/var/www_freifunk/04-additional.sh @@ -1,18 +1,26 @@ #!/usr/bin/env bash -# Show Tools only for internal FFDD-Network clients +# Show additional links only for internal FFDD-Network clients # FFDD-Network ALLOWED_IP="10.200.0.0/15" # get REMOTE_ADDR from CGI ENV IP="$REMOTE_ADDR" +hostname_short="$(cat /etc/hostname | awk -F'.' '{print $1}')" + check_cidr="/usr/bin/grepcidr $ALLOWED_IP <(echo $IP) >/dev/null" eval "$check_cidr" -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 +