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

17 lines
267 B
PHP

<?php
$lock = fopen('/tmp/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);