Skip to content

Commit 0c0d284

Browse files
committed
- Detect older ISPConfig versions in installer and stop if ISPConfig 2 is found.
1 parent 3341c79 commit 0c0d284

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

install/install.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
die("ERROR: Cannot write to the directory ".dirname(ISPC_LOG_FILE).". Are you root or sudo ?\n\n");
8282
}
8383

84+
if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
85+
die('This software can not be installed on a server wich runs ISPConfig 2.x.');
86+
}
87+
8488
//** Select the language
8589
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
8690

install/update.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@
5353
//** Installer/updater logfile
5454
define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log');
5555

56+
//** Check for ISPConfig 2.x versions
57+
if(is_dir('/root/ispconfig') || is_dir('/home/admispconfig')) {
58+
die('This software can not be installed on a server wich runs ISPConfig 2.x.');
59+
}
60+
5661
//** Get distribution identifier
5762
$distname = get_distname();
5863

0 commit comments

Comments
 (0)