diff --git a/runnow.php b/runnow.php index 121f77a..0559098 100644 --- a/runnow.php +++ b/runnow.php @@ -53,7 +53,7 @@ if (filter_var($jobnameResult[0]["url"], FILTER_VALIDATE_URL)) { if($jobnameResult[0]["url"] != "reboot") { $body = ''; $statuscode = 0; - $url = "ssh " . $jobnameResult[0]['host'] . " '" . $jobnameResult[0]['url'] . "'"; + $url = "ssh " . $jobnameResult[0]['host'] . " '" . $jobnameResult[0]['url'] . "' 2>&1"; exec($url, $body, $statuscode); $body = implode("\n", $body); $timestamp = time(); diff --git a/webcron.php b/webcron.php index e0d310b..e874ca2 100644 --- a/webcron.php +++ b/webcron.php @@ -42,7 +42,7 @@ if (file_exists("cache/get-services.trigger")) { foreach($rebootjobs as $job) { $services = array(); - $url = "ssh " . $job['host'] . " '" . "sudo systemctl list-units | cat" . "'"; + $url = "ssh " . $job['host'] . " '" . "sudo systemctl list-units | cat" . "' 2>&1"; exec($url, $services); $services = implode("\n", $services); @@ -81,7 +81,7 @@ foreach ($results as $result) { if($result["url"] != "reboot") { $body = ''; $statuscode = 0; - $url = "ssh " . $result['host'] . " '" . $result['url'] . "'"; + $url = "ssh " . $result['host'] . " '" . $result['url'] . "' 2>&1"; exec($url, $body, $statuscode); $body = implode("\n", $body); } else {