From 66b4f903ee89aff755b2fd434cd0322223df4e71 Mon Sep 17 00:00:00 2001 From: pedro_morgan <pedro_morgan@ispconfig3> Date: Sun, 19 Aug 2007 21:53:10 -0400 Subject: [PATCH] Made log file a constant, replaced with __FILE__ --- install/install.php | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/install/install.php b/install/install.php index 40bb450..fd040cf 100644 --- a/install/install.php +++ b/install/install.php @@ -66,6 +66,8 @@ //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(' 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); -- Gitblit v1.9.1