From 71a11440fd8a23340d129eb3d1f1ebd6d2adb1ee Mon Sep 17 00:00:00 2001 From: Ubergeek Date: Fri, 22 Mar 2019 21:40:15 +0000 Subject: [PATCH] Cleanup --- githook.php | 95 +++-------------------------------------------------- 1 file changed, 4 insertions(+), 91 deletions(-) diff --git a/githook.php b/githook.php index 9efb40b..33659fc 100644 --- a/githook.php +++ b/githook.php @@ -1,89 +1,4 @@ $ratelimit ) { - //touch ( $ansible_dropfile ); + touch ( $ansible_dropfile ); touch ( $ansible_lastrun ); echo "HTTP 200 - Ansible webhook recieved.\n"; } @@ -160,7 +72,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"; @@ -176,7 +88,7 @@ elseif ($data["repository"]["full_name"] == 'thunix/www') { 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"; @@ -193,6 +105,7 @@ elseif ($data["repository"]["full_name"] == 'thunix/thunix_gopher') { else { http_response_code(418); echo "HTTP 418 - I'm a teapot.\n"; + syslog(LOG_INFO, "Tea Pot Webhook recieved.\n"; exit(0); } ?>