From cdf85eada7fe61ee683b3b0dc81b1d3490b02f33 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 18 Nov 2008 13:40:33 -0500
Subject: [PATCH] Updated installation instructions.
---
install/lib/installer_base.lib.php | 34 ++++++++++++++++++----------------
1 files changed, 18 insertions(+), 16 deletions(-)
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index e9a8dd8..51050dd 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -837,7 +837,7 @@
//copy('tpl/apache_ispconfig.vhost.master', "$vhost_conf_dir/ispconfig.vhost");
//* and create the symlink
if($this->install_ispconfig_interface == true) {
- if(!@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
+ if(@is_link("$vhost_conf_enabled_dir/ispconfig.vhost")) unlink("$vhost_conf_enabled_dir/ispconfig.vhost");
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");
}
@@ -918,25 +918,27 @@
unlink('crontab.txt');
//* Getmail crontab
- $cf = $conf['getmail'];
- exec('crontab -u getmail -l > crontab.txt');
- $existing_cron_jobs = file('crontab.txt');
+ if(is_user('getmail')) {
+ $cf = $conf['getmail'];
+ exec('crontab -u getmail -l > crontab.txt');
+ $existing_cron_jobs = file('crontab.txt');
- $cron_jobs = array('*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null');
+ $cron_jobs = array('*/5 * * * * '.$cf['program'].' -g '.$cf['config_dir'].' -r '.$cf['config_dir'].'/*.conf > /dev/null');
- // 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]);
- }
-
- foreach($cron_jobs as $cron_job) {
- if(!in_array($cron_job."\n", $existing_cron_jobs)) {
- $existing_cron_jobs[] = $cron_job."\n";
+ // 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]);
}
+
+ foreach($cron_jobs as $cron_job) {
+ if(!in_array($cron_job."\n", $existing_cron_jobs)) {
+ $existing_cron_jobs[] = $cron_job."\n";
+ }
+ }
+ file_put_contents('crontab.txt', $existing_cron_jobs);
+ exec('crontab -u getmail crontab.txt &> /dev/null');
+ unlink('crontab.txt');
}
- file_put_contents('crontab.txt', $existing_cron_jobs);
- exec('crontab -u getmail crontab.txt &> /dev/null');
- unlink('crontab.txt');
}
}
--
Gitblit v1.9.1