Subversion Repositories ALCASAR

Compare Revisions

Ignore whitespace Rev 1905 → Rev 1906

/scripts/alcasar-flush_ipset_wl.sh
4,8 → 4,8
#Clean wl_ip_allowed ipset when WL users are gone.
 
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]?)"
NB_USERS=ipset list havp_wl | grep -E $PTN | wc -l
if [ $NB_USER -eq '0' ]
NB_USERS=$(ipset list havp_wl | grep -E $PTN | wc -l)
if [ $NB_USERS -eq '0' ]
then
ipset flush wl_ip_allowed
fi