log db errors to syslog and remove tmp-error-logs for reporting in cronrun

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2015-07-29 13:19:32 +02:00
parent 7cd6651895
commit b0325983a1
2 changed files with 20 additions and 6 deletions

View File

@@ -33,6 +33,10 @@ class ConfigIO {
* @return null
*/
public function cleanUp() {
// old error logs
$this->_cleanErrLogs();
// awstats files
$this->_cleanAwstatsFiles();
@@ -52,6 +56,17 @@ class ConfigIO {
$this->_cleanCustomerSslCerts();
}
private function _cleanErrLogs() {
$err_dir = makeCorrectDir(FROXLOR_INSTALL_DIR."/logs/");
if (@is_dir($err_dir)) {
// now get rid of old stuff
//(but append /*.log so we don't delete the directory)
$err_dir.='/*.log';
safe_exec('rm -rf '. makeCorrectFile($err_dir));
}
}
/**
* remove customer-specified auto-generated ssl-certificates
* (they are being regenerated)