| | |
| | | if (!file_exists('autoupdate')) { |
| | | |
| | | //** The banner on the command line |
| | | echo "\n\n".str_repeat('-',80)."\n"; |
| | | echo "\n\n".str_repeat('-', 80)."\n"; |
| | | echo " _____ ___________ _____ __ _ ____ |
| | | |_ _/ ___| ___ \ / __ \ / _(_) /__ \ |
| | | | | \ `--.| |_/ / | / \/ ___ _ __ | |_ _ __ _ _/ / |
| | |
| | | \___/\____/\_| \____/\___/|_| |_|_| |_|\__, | \____/ |
| | | __/ | |
| | | |___/ "; |
| | | echo "\n".str_repeat('-',80)."\n"; |
| | | echo "\n".str_repeat('-', 80)."\n"; |
| | | echo "\n\n>>This script is for internal use only! Please use update.php! \n\n"; |
| | | exit; |
| | | } |
| | | |
| | | //** Include the library with the basic installer functions |
| | | require_once('lib/install.lib.php'); |
| | | require_once 'lib/install.lib.php'; |
| | | |
| | | //** Include the library with the basic updater functions |
| | | require_once('lib/update.lib.php'); |
| | | require_once 'lib/update.lib.php'; |
| | | |
| | | //** Include the base class of the installer class |
| | | require_once('lib/installer_base.lib.php'); |
| | | require_once 'lib/installer_base.lib.php'; |
| | | |
| | | //** Ensure that current working directory is install directory |
| | | $cur_dir = getcwd(); |
| | |
| | | //** Get distribution identifier |
| | | $dist = get_distname(); |
| | | |
| | | include_once("/usr/local/ispconfig/server/lib/config.inc.php"); |
| | | include_once "/usr/local/ispconfig/server/lib/config.inc.php"; |
| | | $conf_old = $conf; |
| | | unset($conf); |
| | | |
| | | if($dist['id'] == '') die('Linux distribution or version not recognized.'); |
| | | |
| | | //** Include the distribution-specific installer class library and configuration |
| | | if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php'); |
| | | include_once('dist/lib/'.$dist['id'].'.lib.php'); |
| | | include_once('dist/conf/'.$dist['id'].'.conf.php'); |
| | | if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once 'dist/lib/'.$dist['baseid'].'.lib.php'; |
| | | include_once 'dist/lib/'.$dist['id'].'.lib.php'; |
| | | include_once 'dist/conf/'.$dist['id'].'.conf.php'; |
| | | |
| | | //** Get hostname |
| | | exec('hostname -f', $tmp_out); |
| | |
| | | $inst->find_installed_apps(); |
| | | |
| | | //** Initialize the MySQL server connection |
| | | include_once('lib/mysql.lib.php'); |
| | | include_once 'lib/mysql.lib.php'; |
| | | |
| | | //** Database update is a bit brute force and should be rebuild later ;) |
| | | |
| | | /* |
| | | * Try to read the DB-admin settings |
| | | */ |
| | | $clientdb_host = ''; |
| | | $clientdb_user = ''; |
| | | $clientdb_password = ''; |
| | | include_once("/usr/local/ispconfig/server/lib/mysql_clientdb.conf"); |
| | | $clientdb_host = ''; |
| | | $clientdb_user = ''; |
| | | $clientdb_password = ''; |
| | | include_once "/usr/local/ispconfig/server/lib/mysql_clientdb.conf"; |
| | | $conf["mysql"]["admin_user"] = $clientdb_user; |
| | | $conf["mysql"]["admin_password"] = $clientdb_password; |
| | | $clientdb_host = ''; |
| | | $clientdb_user = ''; |
| | | $clientdb_password = ''; |
| | | $clientdb_host = ''; |
| | | $clientdb_user = ''; |
| | | $clientdb_password = ''; |
| | | |
| | | //** There is a error if user for mysql admin_password if empty |
| | | if( empty($conf["mysql"]["admin_password"]) ) { |
| | |
| | | } |
| | | |
| | | //** Test mysql root connection |
| | | if(!@mysql_connect($conf["mysql"]["host"],$conf["mysql"]["admin_user"],$conf["mysql"]["admin_password"])) { |
| | | if(!@mysql_connect($conf["mysql"]["host"], $conf["mysql"]["admin_user"], $conf["mysql"]["admin_password"])) { |
| | | die("internal error - MYSQL-Root passord wrong"); |
| | | } |
| | | |
| | |
| | | checkDbHealth(); |
| | | |
| | | /* |
| | | * Prepare the dump of the database |
| | | * Prepare the dump of the database |
| | | */ |
| | | prepareDBDump(); |
| | | |
| | |
| | | //** Configure postfix |
| | | swriteln('Configuring Postfix'); |
| | | $inst->configure_postfix('dont-create-certs'); |
| | | |
| | | |
| | | //** Configure mailman |
| | | swriteln('Configuring Mailman'); |
| | | $inst->configure_mailman('update'); |
| | |
| | | //** Configure PAM |
| | | swriteln('Configuring PAM'); |
| | | $inst->configure_pam(); |
| | | |
| | | |
| | | //* Configure courier |
| | | swriteln('Configuring Courier'); |
| | | $inst->configure_courier(); |
| | |
| | | //** Configure Apache |
| | | swriteln('Configuring Apache'); |
| | | $inst->configure_apache(); |
| | | |
| | | |
| | | //** Configure vlogger |
| | | swriteln('Configuring vlogger'); |
| | | $inst->configure_vlogger(); |
| | |
| | | swriteln('Configuring nginx'); |
| | | $inst->configure_nginx(); |
| | | } |
| | | |
| | | |
| | | //** Configure apps vhost |
| | | swriteln('Configuring Apps vhost'); |
| | | $inst->configure_apps_vhost(); |