überprüfe, ob root ausführt
This commit is contained in:
parent
62c5be4ef5
commit
8d48f4ca5e
@ -40,7 +40,7 @@ do
|
||||
|
||||
# Erlangen schalten wir die Gatewayselection zur Sicherheit bei 450 leases ab, damit noch etwas Puffer nach oben ist!
|
||||
leasecount=$(/usr/sbin/dhcp-lease-list --parsable --lease /var/lib/dhcp/dhcpd.leases 2>&1 | grep "10.50.100" | wc -l)
|
||||
if [ $leasecount -gt 250 ]
|
||||
if [ $leasecount -gt 450 ]
|
||||
then
|
||||
batctl -m bat0 gw_mode off
|
||||
fi
|
||||
|
@ -1,3 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
dhcp-lease-list --lease /var/lib/dhcp/dhcpd.leases
|
||||
if [ ! `id -u` = 0 ]
|
||||
then
|
||||
echo "you are not root"
|
||||
exit 1
|
||||
else
|
||||
dhcp-lease-list --lease /var/lib/dhcp/dhcpd.leases
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user