File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 8585 chdir ( realpath (dirname (__FILE__ )) );
8686}
8787
88- //** Install logfile
89- define ('ISPC_LOG_FILE ' , '/var/log/ispconfig_install.log ' );
9088define ('ISPC_INSTALL_ROOT ' , realpath (dirname (__FILE__ ).'/../ ' ));
9189
9290//** Include the templating lib
156154swriteln ($ inst ->lng (' Tap in "quit" (without the quotes) to stop the installer. ' ."\n\n" ));
157155
158156//** Check log file is writable (probably not root or sudo)
159- if (!is_writable (dirname (ISPC_LOG_FILE ))){
160- die ("ERROR: Cannot write to the " .dirname ( ISPC_LOG_FILE ) ." directory. Are you root or sudo ? \n\n" );
157+ if (!is_writable (dirname ($ conf [ ' ispconfig_log_dir ' ] ))){
158+ die ("ERROR: Cannot write to the " .$ conf [ ' ispconfig_log_dir ' ] ." directory. Are you root or sudo ? \n\n" );
161159}
162160
161+ if (!is_dir ($ conf ['ispconfig_log_dir ' ])) {
162+ mkdir ($ conf ['ispconfig_log_dir ' ], 0755 , true );
163+ }
164+ define ('ISPC_LOG_FILE ' , $ conf ['ispconfig_log_dir ' ] . '/install.log ' );
165+
163166//** Check for ISPConfig 2.x versions
164167if (is_dir ('/root/ispconfig ' ) || is_dir ('/home/admispconfig ' )) {
165168 if (is_dir ('/home/admispconfig ' )) {
Original file line number Diff line number Diff line change 8888if (realpath (dirname (__FILE__ )) != $ cur_dir ) die ("Please run installation/update from _inside_ the install directory! \n" );
8989
9090//** Install logfile
91- define ('ISPC_LOG_FILE ' , '/var/log/ispconfig_install.log ' );
9291define ('ISPC_INSTALL_ROOT ' , realpath (dirname (__FILE__ ).'/../ ' ));
9392
9493//** Include the templating lib
112111include_once "/usr/local/ispconfig/server/lib/config.inc.php " ;
113112$ conf_old = $ conf ;
114113unset($ conf );
114+ define ('ISPC_LOG_FILE ' , $ old_conf ['ispconfig_log_dir ' ] . '/update.log ' );
115115
116116if ($ dist ['id ' ] == '' ) die ('Linux distribution or version not recognized. ' );
117117
You can’t perform that action at this time.
0 commit comments