File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 5353//** Include the base class of the installer class
5454require_once ('lib/installer_base.lib.php ' );
5555
56+ //** Ensure that current working directory is install directory
57+ $ cur_dir = getcwd ();
58+ if (realpath (dirname (__FILE__ )) != $ cur_dir ) die ("Please run installation/update from _inside_ the install directory! \n" );
59+
5660//** Install logfile
5761define ('ISPC_LOG_FILE ' , '/var/log/ispconfig_install.log ' );
5862define ('ISPC_INSTALL_ROOT ' , realpath (dirname (__FILE__ ).'/../ ' ));
Original file line number Diff line number Diff line change 5353//** Include the base class of the installer class
5454require_once ('lib/installer_base.lib.php ' );
5555
56+ //** Ensure that current working directory is install directory
57+ $ cur_dir = getcwd ();
58+ if (realpath (dirname (__FILE__ )) != $ cur_dir ) die ("Please run installation/update from _inside_ the install directory! \n" );
59+
5660//** Install logfile
5761define ('ISPC_LOG_FILE ' , '/var/log/ispconfig_install.log ' );
5862define ('ISPC_INSTALL_ROOT ' , realpath (dirname (__FILE__ ).'/../ ' ));
Original file line number Diff line number Diff line change 5656 clearstatcache ();
5757 for ($ i =0 ;$ i <1200 ;$ i ++){ // Wait max. 1200 sec, then proceed
5858 if (is_file ($ conf ["temppath " ].$ conf ["fs_div " ].".ispconfig_lock " )){
59+ exec ("ps aux | grep '/usr/local/ispconfig/server/server.php' | grep -v 'grep' | wc -l " , $ check );
60+ if (intval ($ check [0 ]) > 1 ) { // 1 because this is 2nd instance!
61+ $ app ->log ("There is already an instance of server.php running. Exiting. " , LOGLEVEL_DEBUG );
62+ exit ;
63+ }
5964 $ app ->log ("There is already a lockfile set. Waiting another 10 seconds... " , LOGLEVEL_DEBUG );
6065 sleep (10 );
6166 clearstatcache ();
You can’t perform that action at this time.
0 commit comments