mirror of
https://github.com/moexe/FFFGateway-Monitoring.git
synced 2026-02-05 22:55:11 +01:00
list l2tp Router
This commit is contained in:
12
sensors/l2tp-routers.sh
Executable file
12
sensors/l2tp-routers.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
# Diese Datei in /etc/sudoers eintragen!!!! z.B. so:
|
||||
# www-data ALL=(ALL) NOPASSWD: /var/www/html/has-mon/sensors/l2tp-routers.sh
|
||||
|
||||
|
||||
ips=$(ip l2 s tunnel | awk '/From/ {print $4}')
|
||||
journalctl -u tunneldigger-broker-sued.service > /tmp/td.log
|
||||
for ip in $ips; do
|
||||
rname="$rname$(grep $ip /tmp/td.log | awk '/Creating/ {gsub ("\\(","");gsub ("\\)",""); print $10"\\n"}')"
|
||||
done
|
||||
|
||||
echo -e $rname | grep -v ^" " | uniq | sort -f
|
||||
Reference in New Issue
Block a user