13 if($url == "" || $file == "") {
14 echo "need a url and file\n";
18 if(file_exists("$file/update.lock")) {
20 $lf = fopen("$file/update.lock", "r");
22 $lockres = flock($lf, LOCK_EX|LOCK_NB);
24 error_log("flock did fail, all is right with the world a download is in progress");
28 error_log("weird problem");
32 $lf = fopen("$file/update.lock", "w");
33 flock($lf, LOCK_EX|LOCK_NB);