1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-11-27 02:14:38 +01:00
MadelineProto/tests/lock_setup.php
2023-11-30 19:35:35 +01:00

17 lines
262 B
PHP

<?php
$lock = fopen('woodpecker.lock', 'c+');
flock($lock, LOCK_EX);
if (fread($lock, 1) !== "1") {
exec("tests/setup.sh", $o, $res);
fwrite($lock, "1");
} else {
$o = [];
$res = 0;
}
flock($lock, LOCK_UN);
echo implode("\n", $o);
exit($res);