|
32 | 32 | ISPConfig 3 installer. |
33 | 33 | */ |
34 | 34 |
|
35 | | -//** Check for existing installation |
36 | | -//if(is_dir("/usr/local/ispconfig")) die('We will stop here. There is already a ISPConfig installation, use the update script to update this installation.'); |
37 | | - |
38 | 35 | error_reporting(E_ALL|E_STRICT); |
39 | 36 |
|
40 | 37 | //** The banner on the command line |
|
56 | 53 | //** Include the base class of the installer class |
57 | 54 | require_once('lib/installer_base.lib.php'); |
58 | 55 |
|
| 56 | +//** Install logfile |
| 57 | +define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); |
| 58 | +define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); |
| 59 | + |
| 60 | +//** Check for existing installation |
| 61 | +/*if(is_dir("/usr/local/ispconfig")) { |
| 62 | + die('We will stop here. There is already a ISPConfig installation, use the update script to update this installation.'); |
| 63 | +}*/ |
| 64 | + |
59 | 65 | //** Get distribution identifier |
60 | 66 | $dist = get_distname(); |
61 | 67 |
|
62 | | -if($dist['id'] == '') die('Linux Dustribution or Version not recognized.'); |
| 68 | +if($dist['id'] == '') die('Linux Distribution or Version not recognized.'); |
63 | 69 |
|
64 | 70 | //** Include the distribution specific installer class library and configuration |
65 | 71 | if(is_file('dist/lib/'.$dist['baseid'].'.lib.php')) include_once('dist/lib/'.$dist['baseid'].'.lib.php'); |
66 | 72 | include_once('dist/lib/'.$dist['id'].'.lib.php'); |
67 | 73 | include_once('dist/conf/'.$dist['id'].'.conf.php'); |
68 | 74 |
|
69 | | -//** Install logfile |
70 | | -define('ISPC_LOG_FILE', '/var/log/ispconfig_install.log'); |
71 | | -define('ISPC_INSTALL_ROOT', realpath(dirname(__FILE__).'/../')); |
72 | | - |
73 | 75 | //**************************************************************************************************** |
74 | 76 | //** Installer Interface |
75 | 77 | //**************************************************************************************************** |
|
97 | 99 | //** Get the hostname |
98 | 100 | $tmp_out = array(); |
99 | 101 | exec('hostname -f', $tmp_out); |
100 | | -$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg foo.example.com ', $tmp_out[0]); |
| 102 | +$conf['hostname'] = $inst->free_query('Full qualified hostname (FQDN) of the server, eg server1.domain.tld ', $tmp_out[0]); |
101 | 103 | unset($tmp_out); |
102 | 104 |
|
103 | 105 | //** Get MySQL root credentials |
|
107 | 109 | $tmp_mysql_server_admin_user = $inst->free_query('MySQL root username', $conf['mysql']['admin_user']); |
108 | 110 | $tmp_mysql_server_admin_password = $inst->free_query('MySQL root password', $conf['mysql']['admin_password']); |
109 | 111 | $tmp_mysql_server_database = $inst->free_query('MySQL database to create', $conf['mysql']['database']); |
| 112 | + $tmp_mysql_server_charset = $inst->free_query('MySQL charset', $conf['mysql']['charset']); |
110 | 113 |
|
111 | 114 | //* Initialize the MySQL server connection |
112 | 115 | if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) { |
113 | 116 | $conf['mysql']['host'] = $tmp_mysql_server_host; |
114 | 117 | $conf['mysql']['admin_user'] = $tmp_mysql_server_admin_user; |
115 | 118 | $conf['mysql']['admin_password'] = $tmp_mysql_server_admin_password; |
116 | 119 | $conf['mysql']['database'] = $tmp_mysql_server_database; |
| 120 | + $conf['mysql']['charset'] = $tmp_mysql_server_charset; |
117 | 121 | $finished = true; |
118 | 122 | } else { |
119 | 123 | swriteln($inst->lng('Unable to connect to mysql server').' '.mysql_error()); |
|
0 commit comments