From 53af670a4d814924c083834b8698e1292f379769 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Thu, 21 Mar 2019 15:26:54 +0000 Subject: [PATCH] Hopefully, fixed again --- githook.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/githook.php b/githook.php index 84d21f4..81e1e15 100644 --- a/githook.php +++ b/githook.php @@ -20,14 +20,14 @@ $client_token = $data["secret"]; if ($client_token !== $access_token) { http_response_code(403); - echo "HTTP 403 - Forbidden."; + echo "HTTP 403 - Forbidden, P1."; exit(0); } if ($remoteip !== $allowedip) { http_repsonse_code(403); - echo "HTTP 403 - Forbidden."; + echo "HTTP 403 - Forbidden, P2."; exit(0); } @@ -49,7 +49,7 @@ if ($data["repository"]["full_name"] == 'thunix/ansible') { } elseif ($data["repository"]["full_name"] == 'thunix/www') { syslog(LOG_INFO, 'WWW Webhook recieved.'); - if ( time () - filemtime ( $lastrun ) > $ratelimit ) { + if ( time () - filemtime ( $www_lastrun ) > $ratelimit ) { touch ( $www_dropfile ); touch ( $www_lastrun ); http_response_code(200);