From a02de31738312d616b2c008de87995920289af56 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Thu, 25 Apr 2019 16:40:27 +0200 Subject: [PATCH] replaced equals by has --- runnow.php | 3 +-- webcron.php | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runnow.php b/runnow.php index bd89e09..33687d2 100644 --- a/runnow.php +++ b/runnow.php @@ -49,8 +49,7 @@ if (filter_var($jobnameResult[0]["url"], FILTER_VALIDATE_URL)) { $timestamp = time(); } else { - - if($jobnameResult[0]["url"] != "reboot") { + if(!stristr($jobnameResult[0]["url"],"reboot")) { $body = ''; $statuscode = 0; $url = "ssh " . $jobnameResult[0]['host'] . " '" . $jobnameResult[0]['url'] . "' 2>&1"; diff --git a/webcron.php b/webcron.php index 985dd91..df85b2d 100644 --- a/webcron.php +++ b/webcron.php @@ -81,7 +81,7 @@ foreach ($results as $result) { $body = $res->getBody(); } else { - if($result["url"] != "reboot") { + if(!stristr($result["url"],"reboot")) { $body = ''; $statuscode = 0; $url = "ssh " . $result['host'] . " '" . $result['url'] . "' 2>&1";