Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed the post-receive PHP hook to redeploy the sinatra application.

  • Loading branch information...
commit fa8cfce5db8ff3652232a2953a62758dbdc9b0d9 1 parent 83b50f9
@msporny msporny authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/utils/git.php
View
4 public/utils/git.php
@@ -3,12 +3,12 @@
// open the token file
$tfile = fopen('remote-update-token.txt', 'r');
-// Acquire the lock in a non-blocking manner
if($tfile == FALSE)
{
echo 'ERROR: You must create a file called remote-update-token.txt and ' .
'place a secret token in that file. See the README for more information.';
}
+// Acquire the lock in a non-blocking manner
else if(flock($tfile, LOCK_EX | LOCK_NB))
{
$token = trim(fgets($tfile));
@@ -24,7 +24,7 @@
echo 'git update successful';
// Run post-update script
- system("./deploy/before_restart && ./deploy/restart");
+ system("./deploy/after_push");
// Sleep for 5 seconds to throttle the update rate to 12 per minute
sleep(5);
}
Please sign in to comment.
Something went wrong with that request. Please try again.