From 0c0d284f099e09410d0998c092e03b8d1f207416 Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Tue, 22 Apr 2008 11:01:12 -0400 Subject: [PATCH] - Detect older ISPConfig versions in installer and stop if ISPConfig 2 is found. --- install/install.php | 4 ++++ install/update.php | 5 +++++ 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/install/install.php b/install/install.php index d3b854c..02912d6 100644 --- a/install/install.php +++ b/install/install.php @@ -81,6 +81,10 @@ die("ERROR: Cannot write to the directory ".dirname(ISPC_LOG_FILE).". Are you root or sudo ?\n\n"); } +if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { + die('This software can not be installed on a server wich runs ISPConfig 2.x.'); +} + //** Select the language $conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en'); diff --git a/install/update.php b/install/update.php index 8f25e42..8d1022a 100644 --- a/install/update.php +++ b/install/update.php @@ -53,6 +53,11 @@ //** Installer/updater logfile define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); +//** Check for ISPConfig 2.x versions +if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) { + die('This software can not be installed on a server wich runs ISPConfig 2.x.'); +} + //** Get distribution identifier $distname = get_distname(); -- Gitblit v1.9.1