From 8a4596b20558f6006be8dbe28eb5d02dc0cb9b8b Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Thu, 15 Jul 2021 11:39:40 -0600 Subject: [PATCH 1/2] "ISPConfig v2 detected" message indicates possible fix --- install/install.php | 7 +++++- install/update.php | 6 ++++- server/lib/classes/system.inc.php | 38 ------------------------------- 3 files changed, 11 insertions(+), 40 deletions(-) diff --git a/install/install.php b/install/install.php index a5233744c8..6194e556a1 100644 --- a/install/install.php +++ b/install/install.php @@ -160,8 +160,13 @@ if(!is_writable(dirname(ISPC_LOG_FILE))){ die("ERROR: Cannot write to the ".dirname(ISPC_LOG_FILE)." directory. Are you root or sudo ?\n\n"); } +//** Check for ISPConfig 2.x versions if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { - die('This software cannot be installed on a server wich runs ISPConfig 2.x.'); + if(is_dir('/home/admispconfig') { + die('This software cannot be installed on a server which runs ISPConfig 2.x.'); + } else { + die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.'); + } } if(is_dir('/usr/local/ispconfig')) { diff --git a/install/update.php b/install/update.php index 0122f27678..d584c112cf 100644 --- a/install/update.php +++ b/install/update.php @@ -96,7 +96,11 @@ require_once 'lib/classes/tpl.inc.php'; //** Check for ISPConfig 2.x versions if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { - die('This software cannot be installed on a server wich runs ISPConfig 2.x.'); + if(is_dir('/home/admispconfig') { + die('This software cannot be installed on a server which runs ISPConfig 2.x.'); + } else { + die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.'); + } } // Patch is required to reapir latest amavis versions diff --git a/server/lib/classes/system.inc.php b/server/lib/classes/system.inc.php index 5a99bbda20..9c202542e8 100644 --- a/server/lib/classes/system.inc.php +++ b/server/lib/classes/system.inc.php @@ -1591,44 +1591,6 @@ class system{ - /** - * Scan the trash for virusses infection - * - */ - function make_trashscan(){ - global $app; - //trashscan erstellen - // Template Öffnen - $app->tpl->clear_all(); - $app->tpl->define( array(table => 'trashscan.master')); - - if(!isset($this->server_conf['virusadmin']) || trim($this->server_conf['virusadmin']) == '') $this->server_conf['virusadmin'] = 'admispconfig@localhost'; - if(substr($this->server_conf['virusadmin'], 0, 1) == '#'){ - $notify = 'no'; - } else { - $notify = 'yes'; - } - - // Variablen zuweisen - $app->tpl->assign( array(VIRUSADMIN => $this->server_conf['virusadmin'], - NOTIFICATION => $notify)); - - $app->tpl->parse(TABLE, table); - - $trashscan_text = $app->tpl->fetch(); - - $datei = '/home/admispconfig/ispconfig/tools/clamav/bin/trashscan'; - $app->file->wf($datei, $trashscan_text); - - chmod($datei, 0755); - chown($datei, 'admispconfig'); - chgrp($datei, 'admispconfig'); - } - - - - - /** * Get the current time * -- GitLab From 4096880fbdddd6404be57414393eef3358031113 Mon Sep 17 00:00:00 2001 From: Jesse Norell Date: Thu, 15 Jul 2021 14:42:24 -0600 Subject: [PATCH 2/2] missing parenthesis --- install/install.php | 2 +- install/update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install/install.php b/install/install.php index 6194e556a1..b94c1c7f6f 100644 --- a/install/install.php +++ b/install/install.php @@ -162,7 +162,7 @@ if(!is_writable(dirname(ISPC_LOG_FILE))){ //** Check for ISPConfig 2.x versions if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { - if(is_dir('/home/admispconfig') { + if(is_dir('/home/admispconfig')) { die('This software cannot be installed on a server which runs ISPConfig 2.x.'); } else { die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.'); diff --git a/install/update.php b/install/update.php index d584c112cf..4639615801 100644 --- a/install/update.php +++ b/install/update.php @@ -96,7 +96,7 @@ require_once 'lib/classes/tpl.inc.php'; //** Check for ISPConfig 2.x versions if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { - if(is_dir('/home/admispconfig') { + if(is_dir('/home/admispconfig')) { die('This software cannot be installed on a server which runs ISPConfig 2.x.'); } else { die('This software cannot be installed on a server which runs ISPConfig 2.x; the presence of the /root/ispconfig/ directory may indicate an ISPConfig 2.x installation, otherwise you can remove or rename it to continue.'); -- GitLab