From 29ac6465a048fbe9c29ee6cc3231fa3347b9bf80 Mon Sep 17 00:00:00 2001
From: ftimme <ft@falkotimme.com>
Date: Tue, 10 Sep 2013 12:11:20 -0400
Subject: [PATCH] - Make sure tar backups are not deleted because of a return value of 1; tar can return 1 because of harmless warnings but still produces valid backups.
---
server/plugins-available/apache2_plugin.inc.php | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/server/plugins-available/apache2_plugin.inc.php b/server/plugins-available/apache2_plugin.inc.php
index 1a5252e..f7c7978 100644
--- a/server/plugins-available/apache2_plugin.inc.php
+++ b/server/plugins-available/apache2_plugin.inc.php
@@ -1493,6 +1493,7 @@
$app->log('Apache did not restart after the configuration change for website '.$data['new']['domain'].'. Reverting the configuration. Saved non-working config as '.$vhost_file.'.err',LOGLEVEL_WARN);
if(is_array($retval['output']) && !empty($retval['output'])){
$app->log('Reason for Apache restart failure: '.implode("\n", $retval['output']),LOGLEVEL_WARN);
+ $app->dbmaster->datalogError(implode("\n", $retval['output']));
} else {
// if no output is given, check again
$webserver_binary = '';
@@ -1526,7 +1527,10 @@
}
if($webserver_binary != ''){
exec($webserver_binary.' -t 2>&1', $tmp_output, $tmp_retval);
- if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)) $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+ if($tmp_retval > 0 && is_array($tmp_output) && !empty($tmp_output)){
+ $app->log('Reason for Apache restart failure: '.implode("\n", $tmp_output),LOGLEVEL_WARN);
+ $app->dbmaster->datalogError(implode("\n", $tmp_output));
+ }
unset($tmp_output, $tmp_retval);
}
}
--
Gitblit v1.9.1