mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
If more than 2 minutes have passed from the prunning process ignore the lock
This commit is contained in:
parent
b16d70ebb1
commit
b9f6677017
@ -41,8 +41,13 @@ require_once("captiveportal.inc");
|
||||
global $g;
|
||||
|
||||
if (file_exists("{$g['tmp_path']}/.rc.prunecaptiveportal.running")) {
|
||||
log_error("Skipping CP prunning process because previous/another instance is already running");
|
||||
return;
|
||||
$stat = stat("{$g['tmp_path']}/.rc.prunecaptiveportal.running");
|
||||
if (time() - $stat['mtime'] >= 120)
|
||||
@unlink("{$g['tmp_path']}/.rc.prunecaptiveportal.running");
|
||||
else {
|
||||
log_error("Skipping CP prunning process because previous/another instance is already running");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@file_put_contents("{$g['tmp_path']}/.rc.prunecaptiveportal.running", "");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user