]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/scripts/captive-cleanup
captive portal: Don't remove unlimited access after one hour
[ipfire-2.x.git] / src / scripts / captive-cleanup
index c39e4883a1e985cebf2d71f8f138e5a6057d0194..cf73760d0d998c08a5fea4678d6a5d877659339b 100755 (executable)
@@ -35,6 +35,9 @@ if (-f $settingsfile && -f $clients && ! -z $clients){
        &General::readhasharray("$clients", \%clientshash);
        $time = time();
        foreach my $key (keys %clientshash) {
+               # Skip unlimited access lines
+               next if ($clientshash{$key}[3] == 0);
+
                $expiretime=($clientshash{$key}[2])+$clientshash{$key}[3];
                if ($expiretime < $time){
                        delete $clientshash{$key};