mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-14 20:40:49 +08:00
install&update add lock file
This commit is contained in:
@@ -632,4 +632,16 @@ class Install
|
||||
return compact('version', 'match');
|
||||
}
|
||||
|
||||
public function checkLock($path)
|
||||
{
|
||||
if (file_exists("$path/.lock")) {
|
||||
die("Locked! Delete .lock file first");
|
||||
}
|
||||
}
|
||||
|
||||
public function setLock($path)
|
||||
{
|
||||
file_put_contents("$path/.lock", "Lock at: " . date('Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user