Commit ccd5cc89 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '6198-clarify-ispconfig-v2-detected-message' into 'develop'

Resolve "clarify "ISPConfig v2 detected" message"

Closes #6198

See merge request !1498
parents a8e9f5f7 4096880f
Pipeline #9214 passed with stage
in 15 seconds
......@@ -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')) {
......
......@@ -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
......
......@@ -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
*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment