@@ -34,6 +34,7 @@ class installer_base {
3434 var $ language = 'en ' ;
3535 var $ db ;
3636 public $ conf ;
37+ public install_ispconfig_interface = true;
3738
3839
3940 public function __construct ()
@@ -148,9 +149,15 @@ public function add_database_server_record() {
148149 global $ conf ;
149150 $ cf = $ conf ['mysql ' ]; // make $conf['mysql'] more accessible
150151
152+ if ($ cf ['host ' ] == 'localhost ' ) {
153+ $ from_host = 'localhost ' ;
154+ } else {
155+ $ from_host = $ inst ->conf ['hostname ' ];
156+ }
157+
151158 //* Create the ISPConfig database user
152159 $ query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ' .$ cf ['database ' ].".* "
153- ."TO ' " .$ cf ['ispconfig_user ' ]."'@' " .$ cf [ ' host ' ] ."' "
160+ ."TO ' " .$ cf ['ispconfig_user ' ]."'@' " .$ from_host ."' "
154161 ."IDENTIFIED BY ' " .$ cf ['ispconfig_password ' ]."'; " ;
155162 if (!$ this ->db ->query ($ query )) {
156163 $ this ->error ('Unable to create database user: ' .$ cf ['ispconfig_user ' ]);
@@ -729,8 +736,10 @@ public function install_ispconfig()
729736
730737 //copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
731738 //* and create the symlink
732- if (!is_link ("$ vhost_conf_enabled_dir/ispconfig.vhost " )) {
733- exec ("ln -s $ vhost_conf_dir/ispconfig.vhost $ vhost_conf_enabled_dir/ispconfig.vhost " );
739+ if ($ this ->install_ispconfig_interface == true ) {
740+ if (!is_link ("$ vhost_conf_enabled_dir/ispconfig.vhost " )) {
741+ exec ("ln -s $ vhost_conf_dir/ispconfig.vhost $ vhost_conf_enabled_dir/ispconfig.vhost " );
742+ }
734743 }
735744
736745 // Make the Clamav log files readable by ISPConfig
0 commit comments