Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
lolo888
ISPConfig 3
Commits
df0089f3
Commit
df0089f3
authored
Jun 08, 2009
by
mcramer
Browse files
- checking for correct working directory in install and update
- checking for running instance in server.php
parent
08669660
Changes
3
Hide whitespace changes
Inline
Side-by-side
install/install.php
View file @
df0089f3
...
...
@@ -53,6 +53,10 @@ require_once('lib/install.lib.php');
//** Include the base class of the installer class
require_once
(
'lib/installer_base.lib.php'
);
//** Ensure that current working directory is install directory
$cur_dir
=
getcwd
();
if
(
realpath
(
dirname
(
__FILE__
))
!=
$cur_dir
)
die
(
"Please run installation/update from _inside_ the install directory!
\n
"
);
//** Install logfile
define
(
'ISPC_LOG_FILE'
,
'/var/log/ispconfig_install.log'
);
define
(
'ISPC_INSTALL_ROOT'
,
realpath
(
dirname
(
__FILE__
)
.
'/../'
));
...
...
install/update.php
View file @
df0089f3
...
...
@@ -53,6 +53,10 @@ require_once('lib/install.lib.php');
//** Include the base class of the installer class
require_once
(
'lib/installer_base.lib.php'
);
//** Ensure that current working directory is install directory
$cur_dir
=
getcwd
();
if
(
realpath
(
dirname
(
__FILE__
))
!=
$cur_dir
)
die
(
"Please run installation/update from _inside_ the install directory!
\n
"
);
//** Install logfile
define
(
'ISPC_LOG_FILE'
,
'/var/log/ispconfig_install.log'
);
define
(
'ISPC_INSTALL_ROOT'
,
realpath
(
dirname
(
__FILE__
)
.
'/../'
));
...
...
server/server.php
View file @
df0089f3
...
...
@@ -56,6 +56,11 @@ if(is_file($conf["temppath"].$conf["fs_div"].".ispconfig_lock")){
clearstatcache
();
for
(
$i
=
0
;
$i
<
1200
;
$i
++
){
// Wait max. 1200 sec, then proceed
if
(
is_file
(
$conf
[
"temppath"
]
.
$conf
[
"fs_div"
]
.
".ispconfig_lock"
)){
exec
(
"ps aux | grep '/usr/local/ispconfig/server/server.php' | grep -v 'grep' | wc -l"
,
$check
);
if
(
intval
(
$check
[
0
])
>
1
)
{
// 1 because this is 2nd instance!
$app
->
log
(
"There is already an instance of server.php running. Exiting."
,
LOGLEVEL_DEBUG
);
exit
;
}
$app
->
log
(
"There is already a lockfile set. Waiting another 10 seconds..."
,
LOGLEVEL_DEBUG
);
sleep
(
10
);
clearstatcache
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment