From d4eae9fd3946d0747a555710f52099221586d538 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 21 Sep 2009 11:46:32 -0400
Subject: [PATCH] Fixed: FS#875 - SRV Records need validation
---
install/dist/lib/fedora.lib.php | 27 ++++++++++++++++++++++++---
1 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/install/dist/lib/fedora.lib.php b/install/dist/lib/fedora.lib.php
index ab88f95..454d482 100644
--- a/install/dist/lib/fedora.lib.php
+++ b/install/dist/lib/fedora.lib.php
@@ -161,16 +161,16 @@
$content = rf($configfile);
// if postfix package is from fedora or centios main repo
$content = str_replace('# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}',
- ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
+ ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
$content);
// If postfix package is from centos plus repo
$content = str_replace('# flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}',
- ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
+ ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
$content);
$content = str_replace(' flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}',
- ' flags=R user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
+ ' flags=DRhu user='.$cf['vmail_username'].' argv=/usr/bin/maildrop -d ${recipient} ${extension} ${recipient} ${user} ${nexthop} ${sender}',
$content);
@@ -409,6 +409,7 @@
if(is_file('/etc/suphp.conf')) {
//replaceLine('/etc/suphp.conf','php=php:/usr/bin','x-httpd-suphp=php:/usr/bin/php-cgi',0);
replaceLine('/etc/suphp.conf','docroot=','docroot=/var/www',0);
+ replaceLine('/etc/suphp.conf','umask=0077','umask=0022',0);
}
//* Create the logging directory for the vhost logfiles
@@ -443,6 +444,23 @@
if(!@is_link($vhost_conf_enabled_dir."/000-ispconfig.conf")) {
exec("ln -s ".$vhost_conf_dir."/ispconfig.conf ".$vhost_conf_enabled_dir."/000-ispconfig.conf");
}
+
+ //* make sure that webalizer finds its config file when it is directly in /etc
+ if(@is_file('/etc/webalizer.conf') && !@is_dir('/etc/webalizer')) {
+ exec('mkdir /etc/webalizer');
+ exec('ln -s /etc/webalizer.conf /etc/webalizer/webalizer.conf');
+ }
+
+ if(is_file('/etc/webalizer/webalizer.conf')) {
+ // Change webalizer mode to incremental
+ replaceLine('/etc/webalizer/webalizer.conf','Incremental no','Incremental yes',0,0);
+ replaceLine('/etc/webalizer/webalizer.conf','IncrementalName webalizer.current','IncrementalName webalizer.current',0,0);
+ replaceLine('/etc/webalizer/webalizer.conf','HistoryName webalizer.hist','HistoryName webalizer.hist',0,0);
+ }
+
+ //* add a sshusers group
+ $command = 'groupadd sshusers';
+ if(!is_group('sshusers')) caselog($command.' &> /dev/null 2> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
}
@@ -555,6 +573,7 @@
$content = str_replace('{mysql_master_server_database}', $conf['mysql']['master_database'], $content);
$content = str_replace('{mysql_master_server_host}', $conf['mysql']['master_host'], $content);
+ $content = str_replace('{server_id}', $conf['server_id'], $content);
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
$content = str_replace('{language}', $conf['language'], $content);
@@ -578,6 +597,8 @@
$content = str_replace('{server_id}', $conf['server_id'], $content);
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
+ $content = str_replace('{language}', $conf['language'], $content);
+
wf("$install_dir/server/lib/$configfile", $content);
--
Gitblit v1.9.1