(root)//scripts/alcasar-flush_ipset_wl.sh – Rev 1906 → 1907
Rev 1906 |
Go to most recent revision |
Show entire file |
Ignore whitespace |
Details |
Blame |
Last modification |
View Log
Rev 1906 |
Rev 1907 |
Line 5... |
Line 5... |
5 |
|
5 |
|
6 |
PTN="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
|
6 |
PTN="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)"
|
7 |
NB_USERS=$(ipset list havp_wl | grep -E $PTN | wc -l)
|
7 |
NB_USERS=$(ipset list havp_wl | grep -E $PTN | wc -l)
|
8 |
if [ $NB_USERS -eq '0' ]
|
8 |
if [ $NB_USERS -eq '0' ]
|
9 |
then
|
9 |
then
|
10 |
ipset flush wl_ip_allowed
|
10 |
/sbin/ipset flush wl_ip_allowed
|
11 |
fi
|
11 |
fi
|