Catching stderr again
This commit is contained in:
parent
5d5d3f06b5
commit
b24ed85c76
|
@ -53,7 +53,7 @@ if (filter_var($jobnameResult[0]["url"], FILTER_VALIDATE_URL)) {
|
||||||
if($jobnameResult[0]["url"] != "reboot") {
|
if($jobnameResult[0]["url"] != "reboot") {
|
||||||
$body = '';
|
$body = '';
|
||||||
$statuscode = 0;
|
$statuscode = 0;
|
||||||
$url = "ssh " . $jobnameResult[0]['host'] . " '" . $jobnameResult[0]['url'] . "'";
|
$url = "ssh " . $jobnameResult[0]['host'] . " '" . $jobnameResult[0]['url'] . "' 2>&1";
|
||||||
exec($url, $body, $statuscode);
|
exec($url, $body, $statuscode);
|
||||||
$body = implode("\n", $body);
|
$body = implode("\n", $body);
|
||||||
$timestamp = time();
|
$timestamp = time();
|
||||||
|
|
|
@ -42,7 +42,7 @@ if (file_exists("cache/get-services.trigger")) {
|
||||||
foreach($rebootjobs as $job) {
|
foreach($rebootjobs as $job) {
|
||||||
|
|
||||||
$services = array();
|
$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);
|
exec($url, $services);
|
||||||
$services = implode("\n", $services);
|
$services = implode("\n", $services);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ foreach ($results as $result) {
|
||||||
if($result["url"] != "reboot") {
|
if($result["url"] != "reboot") {
|
||||||
$body = '';
|
$body = '';
|
||||||
$statuscode = 0;
|
$statuscode = 0;
|
||||||
$url = "ssh " . $result['host'] . " '" . $result['url'] . "'";
|
$url = "ssh " . $result['host'] . " '" . $result['url'] . "' 2>&1";
|
||||||
exec($url, $body, $statuscode);
|
exec($url, $body, $statuscode);
|
||||||
$body = implode("\n", $body);
|
$body = implode("\n", $body);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue