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
66b4f903
Commit
66b4f903
authored
Aug 20, 2007
by
pedro_morgan
Browse files
Made log file a constant, replaced with __FILE__
parent
facccbd6
Changes
3
Hide whitespace changes
Inline
Side-by-side
install/install.php
View file @
66b4f903
...
...
@@ -66,6 +66,8 @@ include_once('dist/conf/'.$conf['distname'].'.conf.php');
//TODO: this is not there ????
$conf
[
'dist'
]
=
$dist
;
define
(
'ISPC_LOG_FILE'
,
'/var/log/ispconfig_install.log'
);
//****************************************************************************************************
//** Installer Interface
//****************************************************************************************************
...
...
@@ -74,12 +76,17 @@ swriteln($inst->lng(' Following will be a few questions for primary configura
swriteln
(
$inst
->
lng
(
' Default values are in [brackets] and can be accepted with <ENTER>.'
));
swriteln
(
$inst
->
lng
(
' Tap in "quit" (without the quotes) to stop the installer.'
.
"
\n\n
"
));
if
(
!
is_writable
(
ISPC_LOG_FILE
)){
die
(
"ERROR: Cannot write to the log file '"
.
ISPC_LOG_FILE
.
"'. Are you root ?
\n\n
"
);
}
//** Select the language
$conf
[
'language'
]
=
$inst
->
simple_query
(
'Select language'
,
array
(
'en'
,
'de'
),
'en'
);
//** Select installation mode
$install_mode
=
$inst
->
simple_query
(
'Installation mode'
,
array
(
'Standard'
,
'Expert'
),
'Standard'
);
//** Get the hostname
$tmp_out
=
array
();
exec
(
'hostname -f'
,
$tmp_out
);
...
...
install/lib/install.lib.php
View file @
66b4f903
...
...
@@ -78,8 +78,7 @@ function swriteln($text = '') {
}
function
ilog
(
$msg
){
$logfile
=
'/var/log/ispconfig_install.log'
;
exec
(
"echo `date`
\"
- [ISPConfig] -
\"
"
.
$msg
.
" >> "
.
$logfile
);
exec
(
"echo `date`
\"
- [ISPConfig] -
\"
"
.
$msg
.
" >> "
.
ISPC_LOG_FILE
);
}
function
error
(
$msg
){
...
...
install/lib/installer_base.lib.php
View file @
66b4f903
...
...
@@ -142,14 +142,14 @@ class installer_base {
//* Load the database dump into the database, if database contains no tables
$db_tables
=
$this
->
db
->
getTables
();
if
(
count
(
$db_tables
)
>
0
)
{
$this
->
error
(
'Stopped: Database contains
already
some tables.'
);
$this
->
error
(
'Stopped: Database
already
contains some tables.'
);
}
else
{
if
(
$cf
[
'admin_password'
]
==
''
)
{
caselog
(
"mysql -h '"
.
$cf
[
'host'
]
.
"' -u '"
.
$cf
[
'admin_user'
]
.
"' '"
.
$cf
[
'database'
]
.
"' < 'sql/ispconfig3.sql' &> /dev/null"
,
$
FILE
,
__LINE__
,
'read in ispconfig3.sql'
,
'could not read in ispconfig3.sql'
);
__
FILE
__
,
__LINE__
,
'read in ispconfig3.sql'
,
'could not read in ispconfig3.sql'
);
}
else
{
caselog
(
"mysql -h '"
.
$cf
[
'host'
]
.
"' -u '"
.
$cf
[
'admin_user'
]
.
"' -p'"
.
$cf
[
'admin_password'
]
.
"' '"
.
$cf
[
'database'
]
.
"' < 'sql/ispconfig3.sql' &> /dev/null"
,
$
FILE
,
__LINE__
,
'read in ispconfig3.sql'
,
'could not read in ispconfig3.sql'
);
__
FILE
__
,
__LINE__
,
'read in ispconfig3.sql'
,
'could not read in ispconfig3.sql'
);
}
$db_tables
=
$this
->
db
->
getTables
();
if
(
count
(
$db_tables
)
==
0
)
{
...
...
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