tbrehm
2008-05-23 00d96ba2cd3f93272474e51a2c7f5b1a35616ec3
install/update.php
@@ -79,8 +79,6 @@
echo "This application will update ISPConfig 3 on your server.\n";
//** TODO: all other queries, for testing I will setup everything in $conf
//** Initialize the MySQL server connection
include_once('lib/mysql.lib.php');
@@ -130,6 +128,10 @@
   system("mysql -h ".$conf['mysql']['host']." -u ".$conf['mysql']['admin_user']." ".$conf['mysql']['database']." < existing_db.sql");
}
//** Shall the services be reconfigured during update
$reconfigure_services_answer = $inst->simple_query('Reconfigure Services?', 'yes,no','yes');
if($reconfigure_services_answer == 'yes') {
//** Configure postfix
$inst->configure_postfix('dont-create-certs');
@@ -168,16 +170,21 @@
//** Configure Apache
swriteln('Configuring Apache');
$inst->configure_apache();
}
//** Configure ISPConfig
swriteln('Installing ISPConfig');
swriteln('Updating ISPConfig');
$inst->install_ispconfig();
//** Configure ISPConfig
swriteln('Installing Crontab');
//** Configure Crontab
$update_crontab_answer = $inst->simple_query('Reconfigure Services?', 'yes,no','yes');
if($update_crontab_answer == 'yes') {
   swriteln('Updating Crontab');
$inst->install_crontab();
}
//** Restart services:
if($reconfigure_services_answer == 'yes') {
swriteln('Restarting services ...');
system("/etc/init.d/mysql restart");
system("/etc/init.d/postfix restart");
@@ -192,6 +199,7 @@
system("/etc/init.d/apache2 restart");
system("/etc/init.d/pure-ftpd-mysql restart");
system("/etc/init.d/mydns restart");
}
echo "Update finished.\n";