7171//** Get distribution identifier
7272$ dist = get_distname ();
7373
74- if ($ dist ['id ' ] == '' ) die ('Linux Distribution or Version not recognized. ' );
74+ if ($ dist ['id ' ] == '' ) die ('Linux distribution or version not recognized. ' );
7575
76- //** Include the distribution specific installer class library and configuration
76+ //** Include the distribution- specific installer class library and configuration
7777if (is_file ('dist/lib/ ' .$ dist ['baseid ' ].'.lib.php ' )) include_once ('dist/lib/ ' .$ dist ['baseid ' ].'.lib.php ' );
7878include_once ('dist/lib/ ' .$ dist ['id ' ].'.lib.php ' );
7979include_once ('dist/conf/ ' .$ dist ['id ' ].'.conf.php ' );
8888
8989//** Check log file is writable (probably not root or sudo)
9090if (!is_writable (dirname (ISPC_LOG_FILE ))){
91- die ("ERROR: Cannot write to the directory " .dirname (ISPC_LOG_FILE ).". Are you root or sudo ? \n\n" );
91+ die ("ERROR: Cannot write to the " .dirname (ISPC_LOG_FILE )." directory . Are you root or sudo ? \n\n" );
9292}
9393
9494if (is_dir ('/root/ispconfig ' ) || is_dir ('/home/admispconfig ' )) {
116116unset($ tmp_out );
117117
118118// Check if the mysql functions are loaded in PHP
119- if (!function_exists ('mysql_connect ' )) die ('No PHP mysql functions available. Please ensure that the PHP mysql module is loaded. ' );
119+ if (!function_exists ('mysql_connect ' )) die ('No PHP MySQL functions available. Please ensure that the PHP MySQL module is loaded. ' );
120120
121121//** Get MySQL root credentials
122122$ finished = false ;
123123do {
124124 $ tmp_mysql_server_host = $ inst ->free_query ('MySQL server hostname ' , $ conf ['mysql ' ]['host ' ]);
125125 $ tmp_mysql_server_admin_user = $ inst ->free_query ('MySQL root username ' , $ conf ['mysql ' ]['admin_user ' ]);
126126 $ tmp_mysql_server_admin_password = $ inst ->free_query ('MySQL root password ' , $ conf ['mysql ' ]['admin_password ' ]);
127- $ tmp_mysql_server_database = $ inst ->free_query ('MySQL database to create ' , $ conf ['mysql ' ]['database ' ]);
128- $ tmp_mysql_server_charset = $ inst ->free_query ('MySQL charset ' , $ conf ['mysql ' ]['charset ' ]);
127+ $ tmp_mysql_server_database = $ inst ->free_query ('MySQL database to create ' , $ conf ['mysql ' ]['database ' ]);
128+ $ tmp_mysql_server_charset = $ inst ->free_query ('MySQL charset ' , $ conf ['mysql ' ]['charset ' ]);
129129
130130 //* Initialize the MySQL server connection
131131 if (@mysql_connect ($ tmp_mysql_server_host , $ tmp_mysql_server_admin_user , $ tmp_mysql_server_admin_password )) {
132132 $ conf ['mysql ' ]['host ' ] = $ tmp_mysql_server_host ;
133133 $ conf ['mysql ' ]['admin_user ' ] = $ tmp_mysql_server_admin_user ;
134134 $ conf ['mysql ' ]['admin_password ' ] = $ tmp_mysql_server_admin_password ;
135- $ conf ['mysql ' ]['database ' ] = $ tmp_mysql_server_database ;
136- $ conf ['mysql ' ]['charset ' ] = $ tmp_mysql_server_charset ;
135+ $ conf ['mysql ' ]['database ' ] = $ tmp_mysql_server_database ;
136+ $ conf ['mysql ' ]['charset ' ] = $ tmp_mysql_server_charset ;
137137 $ finished = true ;
138138 } else {
139- swriteln ($ inst ->lng ('Unable to connect to mysql server ' ).' ' .mysql_error ());
139+ swriteln ($ inst ->lng ('Unable to connect to the specified MySQL server ' ).' ' .mysql_error ());
140140 }
141141} while ($ finished == false );
142142unset($ finished );
143143
144- // Resolve the IP address of the mysql hostname.
144+ // Resolve the IP address of the MySQL hostname.
145145$ tmp = explode (': ' ,$ conf ['mysql ' ]['host ' ]);
146146if (!$ conf ['mysql ' ]['ip ' ] = gethostbyname ($ tmp [0 ])) die ('Unable to resolve hostname ' .$ tmp [0 ]);
147147unset($ tmp );
148148
149149
150- //** initializing database connection
150+ //** Initializing database connection
151151include_once ('lib/mysql.lib.php ' );
152152$ inst ->db = new db ();
153153
154154//** Begin with standard or expert installation
155155if ($ install_mode == 'standard ' ) {
156156
157- //* Create the mysql database
157+ //* Create the MySQL database
158158 $ inst ->configure_database ();
159159
160160 //* Insert the Server record into the database
161161 $ inst ->add_database_server_record ();
162162
163- //* Configure postfix
163+ //* Configure Postfix
164164 $ inst ->configure_postfix ();
165165
166166 //* Configure jailkit
167167 swriteln ('Configuring Jailkit ' );
168168 $ inst ->configure_jailkit ();
169169
170170 if ($ conf ['dovecot ' ]['installed ' ] == true ) {
171- //* Configure dovecot
171+ //* Configure Dovecot
172172 swriteln ('Configuring Dovecot ' );
173173 $ inst ->configure_dovecot ();
174174 } else {
180180 swriteln ('Configuring PAM ' );
181181 $ inst ->configure_pam ();
182182
183- //* Configure courier
183+ //* Configure Courier
184184 swriteln ('Configuring Courier ' );
185185 $ inst ->configure_courier ();
186186 }
218218 swriteln ('Configuring Apache ' );
219219 $ inst ->configure_apache ();
220220
221- //** Configure vlogger
222- swriteln ('Configuring vlogger ' );
221+ //** Configure Vlogger
222+ swriteln ('Configuring Vlogger ' );
223223 $ inst ->configure_vlogger ();
224224
225225 //** Configure apps vhost
233233 //* Configure ISPConfig
234234 swriteln ('Installing ISPConfig ' );
235235
236- //** Customise the port ISPConfig runs on
236+ //** Customize the port ISPConfig runs on
237237 $ conf ['apache ' ]['vhost_port ' ] = $ inst ->free_query ('ISPConfig Port ' , '8080 ' );
238238
239239 $ inst ->install_ispconfig ();
243243 $ inst ->configure_dbserver ();
244244
245245 //* Configure ISPConfig
246- swriteln ('Installing Crontab ' );
246+ swriteln ('Installing ISPConfig crontab ' );
247247 $ inst ->install_crontab ();
248248
249249 swriteln ('Restarting services ... ' );
408408 }
409409
410410 //** Configure Apache
411- swriteln ("\nHint: If this server shall run the ispconfig interface, select 'y' in the 'Configure Apache Server' option. \n" );
411+ swriteln ("\nHint: If this server shall run the ISPConfig interface, select 'y' in the 'Configure Apache Server' option. \n" );
412412 if (strtolower ($ inst ->simple_query ('Configure Apache Server ' ,array ('y ' ,'n ' ),'y ' )) == 'y ' ) {
413413 $ conf ['services ' ]['web ' ] = true ;
414414 swriteln ('Configuring Apache ' );
415415 $ inst ->configure_apache ();
416416
417- //** Configure vlogger
418- swriteln ('Configuring vlogger ' );
417+ //** Configure Vlogger
418+ swriteln ('Configuring Vlogger ' );
419419 $ inst ->configure_vlogger ();
420420
421421 //** Configure apps vhost
430430 }
431431
432432 //** Configure ISPConfig :-)
433- if (strtolower ($ inst ->simple_query ('Install ISPConfig Web- Interface ' ,array ('y ' ,'n ' ),'y ' )) == 'y ' ) {
433+ if (strtolower ($ inst ->simple_query ('Install ISPConfig Web Interface ' ,array ('y ' ,'n ' ),'y ' )) == 'y ' ) {
434434 swriteln ('Installing ISPConfig ' );
435435
436436 //** We want to check if the server is a module or cgi based php enabled server
467467 $ inst ->configure_dbserver ();
468468
469469 //* Configure ISPConfig
470- swriteln ('Installing Crontab ' );
470+ swriteln ('Installing ISPConfig crontab ' );
471471 $ inst ->install_crontab ();
472472 if ($ conf ['apache ' ]['init_script ' ] != '' && @is_file ($ conf ['init_scripts ' ].'/ ' .$ conf ['apache ' ]['init_script ' ])) system ($ conf ['init_scripts ' ].'/ ' .$ conf ['apache ' ]['init_script ' ].' restart ' );
473473
479479echo "Installation completed. \n" ;
480480
481481
482- ?>
482+ ?>
0 commit comments