From 5714c3c5db24bc7e511a3c6f9e6446ffa859f243 Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Fri, 22 Mar 2019 21:33:06 +0000 Subject: [PATCH] Ok, tested and fixed, finally! --- githook.php | 113 ++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 101 insertions(+), 12 deletions(-) diff --git a/githook.php b/githook.php index 17641e4..9efb40b 100644 --- a/githook.php +++ b/githook.php @@ -1,5 +1,92 @@ $ratelimit ) { - touch ( $ansible_dropfile ); + //touch ( $ansible_dropfile ); touch ( $ansible_lastrun ); echo "HTTP 200 - Ansible webhook recieved.\n"; } @@ -71,7 +160,7 @@ if ($data["repository"]["full_name"] == 'thunix/ansible') { elseif ($data["repository"]["full_name"] == 'thunix/www') { syslog(LOG_INFO, 'WWW Webhook recieved.'); if ( time () - filemtime ( $www_lastrun ) > $ratelimit ) { - touch ( $www_dropfile ); + //touch ( $www_dropfile ); touch ( $www_lastrun ); http_response_code(200); echo "HTTP 200 - WWW webhook recieved.\n"; @@ -84,10 +173,10 @@ elseif ($data["repository"]["full_name"] == 'thunix/www') { } // Hook for gopher. Not implemented on the backend yet. -elseif ($data["repository"]["full_name"] == 'thunix/gopher') { +elseif ($data["repository"]["full_name"] == 'thunix/thunix_gopher') { syslog(LOG_INFO, 'Gopher Webhook recieved.'); if ( time () - filemtime ( $gopher_lastrun ) > $ratelimit ) { - touch ( $gopher_dropfile ); + //touch ( $gopher_dropfile ); touch ( $gopher_lastrun ); http_response_code(200); echo "HTTP 200 - Gopher webhook recieved.\n";