mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-23 01:12:57 +02:00
Captive-Portal: fix cleanup script
The cleanup-script did not write back the hash after the expired voucher was delted Signed-off-by: Alexander Marx <alexander.marx@ipfire.org>
This commit is contained in:
committed by
Michael Tremer
parent
5dc32e5877
commit
07d56062a9
@@ -37,7 +37,10 @@ if (-f $settingsfile && -f $clients && ! -z $clients){
|
||||
foreach my $key (keys %clientshash) {
|
||||
$expiretime=($clientshash{$key}[2])+$clientshash{$key}[3];
|
||||
if ($expiretime < $time){
|
||||
delete $clientshash{key};
|
||||
delete $clientshash{$key};
|
||||
my $exp = gmtime($expiretime);
|
||||
&General::log("Captive", "Delete expired voucher $clientshash{$key}[4] expired on $exp. Remark: $clientshash{$key}[5]");
|
||||
}
|
||||
}
|
||||
&General::writehasharray("$clients", \%clientshash);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user