Skip to content

Commit

Permalink
missing hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
arturoc committed Jan 21, 2016
1 parent a9132fa commit a811a9b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions book_hook.php
@@ -0,0 +1,13 @@
<?php
/*$fp = fopen("./lock_site", "r+");
while (!flock($fp, LOCK_EX)) { // do an exclusive lock
sleep(2);
}
system("../ofSite/build.sh 2> /dev/null");
flock($fp, LOCK_UN); // release the lock
fclose($fp);*/

$fp = fopen("../hooks/.regenerate_book","w+");
fclose($fp);
?>

8 changes: 8 additions & 0 deletions release_hook.php
@@ -0,0 +1,8 @@
<?php
$ip = $_SERVER['REMOTE_ADDR'];
if($ip!="198.61.170.130") die("anauthorized ip".$ip);
$fp = fopen("../hooks/.regenerate_release","w+");
fwrite($fp,$_GET[version]);
fclose($fp);
?>

0 comments on commit a811a9b

Please sign in to comment.