Skip to content

Commit 5b3f251

Browse files
author
Till Brehm
committed
- Removed unused file form.inc.php
- Added some cleanup code
1 parent 0281b9f commit 5b3f251

File tree

3 files changed

+19
-518
lines changed

3 files changed

+19
-518
lines changed

install/lib/installer_base.lib.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2152,7 +2152,7 @@ public function install_ispconfig() {
21522152

21532153
// Add symlink for patch tool
21542154
if(!is_link('/usr/local/bin/ispconfig_patch')) exec('ln -s /usr/local/ispconfig/server/scripts/ispconfig_patch /usr/local/bin/ispconfig_patch');
2155-
2155+
21562156
}
21572157

21582158
public function configure_dbserver() {
@@ -2240,6 +2240,21 @@ public function install_crontab() {
22402240
touch($conf['ispconfig_log_dir'].'/cron.log');
22412241
chmod($conf['ispconfig_log_dir'].'/cron.log', 0660);
22422242

2243+
}
2244+
2245+
// This function is called at the end of the update process and contains code to clean up parts of old ISPCONfig releases
2246+
public function cleanup_ispconfig() {
2247+
global $app,$conf;
2248+
2249+
// Remove directories recursively
2250+
if(is_dir('/usr/local/ispconfig/interface/web/designer')) exec('rm -rf /usr/local/ispconfig/interface/web/designer');
2251+
2252+
// Remove files
2253+
if(is_file('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/db_firebird.inc.php');
2254+
if(is_file('/usr/local/ispconfig/interface/lib/classes/form.inc.php')) unlink('/usr/local/ispconfig/interface/lib/classes/form.inc.php');
2255+
2256+
2257+
22432258
}
22442259

22452260
public function getinitcommand($servicename, $action, $init_script_directory = ''){

install/update.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,9 @@
443443

444444
$inst->install_ispconfig();
445445

446+
// Cleanup
447+
$inst->cleanup_ispconfig();
448+
446449
//** Configure Crontab
447450
$update_crontab_answer = $inst->simple_query('Reconfigure Crontab?', array('yes', 'no'), 'yes','reconfigure_crontab');
448451
if($update_crontab_answer == 'yes') {

0 commit comments

Comments
 (0)