From 3fb77db77e8d6ee6f8140c438b7fb4a8c1efa00f Mon Sep 17 00:00:00 2001
From: redray <redray@ispconfig3>
Date: Mon, 16 Feb 2009 18:30:30 -0500
Subject: [PATCH] small db-fix
---
install/lib/installer_base.lib.php | 20 ++++++++++++++------
1 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index abdf109..d3047f6 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -230,7 +230,7 @@
$from_ip = gethostbyname($conf['hostname']);
//* username for the ispconfig user
- $conf['mysql']['master_ispconfig_user'] = 'ispconfigserver'.$conf['server_id'];
+ $conf['mysql']['master_ispconfig_user'] = 'ispcsrv'.$conf['server_id'];
//* Delete ISPConfig user in the master database, in case that it exists
$this->dbmaster->query("DELETE FROM mysql.user WHERE User = '".$conf['mysql']['master_ispconfig_user']."' AND Host = '".$from_host."';");
@@ -991,6 +991,13 @@
if(!@is_link("$vhost_conf_enabled_dir/000-ispconfig.vhost")) {
exec("ln -s $vhost_conf_dir/ispconfig.vhost $vhost_conf_enabled_dir/000-ispconfig.vhost");
}
+
+ exec('mkdir -p /var/www/php-fcgi-scripts/ispconfig');
+ exec('cp tpl/apache_ispconfig_fcgi_starter.master /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+ exec('chmod +x /var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+ exec('ln -s /usr/local/ispconfig/interface/web /var/www/ispconfig');
+ exec('chown -R ispconfig:ispconfig /var/www/php-fcgi-scripts/ispconfig');
+
}
// Make the Clamav log files readable by ISPConfig
@@ -1001,9 +1008,6 @@
exec('cp ../helper_scripts/update_from_svn.sh /usr/local/bin/ispconfig_update_from_svn.sh');
exec('chown root /usr/local/bin/ispconfig_update_from_svn.sh');
exec('chmod 700 /usr/local/bin/ispconfig_update_from_svn.sh');
-
- //set the fast cgi starter script to executable
- exec('chmod 755 '.$install_dir.'/interface/bin/php-fcgi');
//* Make the logs readable for the ispconfig user
if(@is_file('/var/log/mail.log')) exec('chmod +r /var/log/mail.log');
@@ -1075,12 +1079,12 @@
$existing_cron_jobs = file('crontab.txt');
$cron_jobs = array(
- '*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log'
+ '*/5 * * * * '.$cf['program'].' -n -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null 2>> /var/log/ispconfig/cron.log'
);
// remove existing ispconfig cronjobs, in case the syntax has changed
foreach($cron_jobs as $key => $val) {
- if(stristr($val,$cf['program'])) unset($cron_jobs[$key]);
+ if(stristr($val,$cf['program'])) unset($existing_cron_jobs[$key]);
}
foreach($cron_jobs as $cron_job) {
@@ -1092,6 +1096,10 @@
exec('crontab -u getmail crontab.txt &> /dev/null');
unlink('crontab.txt');
}
+
+ exec('touch /var/log/ispconfig/cron.log');
+ exec('chmod 666 /var/log/ispconfig/cron.log');
+
}
}
--
Gitblit v1.9.1