From: Alexander Marx Date: Mon, 8 Feb 2016 09:56:01 +0000 (+0100) Subject: Captive-Portal: fix cleanup script X-Git-Tag: v2.19-core115~60^2~74 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07d56062a90d84c8504783b1c70fb06466a90dc2;p=ipfire-2.x.git 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 --- diff --git a/src/scripts/captive-cleanup b/src/scripts/captive-cleanup index aae6f6064d..c39e4883a1 100755 --- a/src/scripts/captive-cleanup +++ b/src/scripts/captive-cleanup @@ -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); }