From cdb391d3f81310928c7af3d5cd2da0e9a6a9263f Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 05 Mar 2009 16:36:08 -0500
Subject: [PATCH] updated opensuse installer.
---
install/dist/lib/opensuse.lib.php | 32 ++++++++++++++++++++++++++++----
1 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php
index 35c765c..9412d04 100644
--- a/install/dist/lib/opensuse.lib.php
+++ b/install/dist/lib/opensuse.lib.php
@@ -159,9 +159,15 @@
}
$configfile = $config_dir.'/master.cf';
$content = rf($configfile);
+
$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}',
$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}',
+ $content);
+
wf($configfile, $content);
//* Writing the Maildrop mailfilter file
@@ -189,7 +195,7 @@
public function configure_saslauthd() {
global $conf;
- /*
+
$configfile = 'sasl_smtpd.conf';
if(is_file('/etc/sasl2/smtpd.conf')) copy('/etc/sasl2/smtpd.conf','/etc/sasl2/smtpd.conf~');
if(is_file('/etc/sasl2/smtpd.conf~')) exec('chmod 400 '.'/etc/sasl2/smtpd.conf~');
@@ -199,7 +205,7 @@
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
$content = str_replace('{mysql_server_ip}',$conf['mysql']['ip'],$content);
wf('/etc/sasl2/smtpd.conf',$content);
- */
+
// TODO: Chmod and chown on the config file
@@ -429,6 +435,15 @@
af('/etc/apache2/httpd.conf',"\nInclude /etc/apache2/sites-enabled/\n\n");
}
unset($content);
+
+ //* Copy the ISPConfig configuration include
+ $vhost_conf_dir = $conf['apache']['vhost_conf_dir'];
+ $vhost_conf_enabled_dir = $conf['apache']['vhost_conf_enabled_dir'];
+
+ copy('tpl/apache_ispconfig.conf.master',$vhost_conf_dir.'/ispconfig.conf');
+ 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");
+ }
}
@@ -701,6 +716,15 @@
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 /srv/www/php-fcgi-scripts/ispconfig');
+ exec('cp tpl/apache_ispconfig_fcgi_starter.master /srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+ exec('chmod +x /srv/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter');
+ exec('ln -s /usr/local/ispconfig/interface/web /srv/www/ispconfig');
+ exec('chown -R ispconfig:ispconfig /srv/www/php-fcgi-scripts/ispconfig');
+
+ //replaceLine('/var/www/php-fcgi-scripts/ispconfig/.php-fcgi-starter','PHPRC=','PHPRC=/etc/',0,0);
+
}
// Make the Clamav log files readable by ISPConfig
@@ -713,7 +737,7 @@
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');
+ //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');
@@ -807,7 +831,7 @@
}
exec('touch /var/log/ispconfig/cron.log');
- exec('chmod +666 /var/log/ispconfig/cron.log');
+ exec('chmod 666 /var/log/ispconfig/cron.log');
}
}
--
Gitblit v1.9.1