| | |
| | | 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~'); |
| | |
| | | $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 |
| | | |
| | |
| | | $configfile = $conf["init_scripts"].'/'.$conf["saslauthd"]["init_script"]; |
| | | $content = rf($configfile); |
| | | $content = str_replace('/sbin/startproc $AUTHD_BIN -a $SASLAUTHD_AUTHMECH -n $SASLAUTHD_THREADS > /dev/null 2>&1','/sbin/startproc $AUTHD_BIN -r -a $SASLAUTHD_AUTHMECH -n $SASLAUTHD_THREADS > /dev/null 2>&1',$content); |
| | | $content = str_replace('/sbin/startproc $AUTHD_BIN $SASLAUTHD_PARAMS -a $SASLAUTHD_AUTHMECH -n $SASLAUTHD_THREADS > /dev/null 2>&1','/sbin/startproc $AUTHD_BIN $SASLAUTHD_PARAMS -r -a $SASLAUTHD_AUTHMECH -n $SASLAUTHD_THREADS > /dev/null 2>&1',$content); |
| | | |
| | | |
| | | wf($configfile,$content); |
| | | |
| | | |
| | |
| | | //* Create the logging directory for the vhost logfiles |
| | | exec('mkdir -p /var/log/ispconfig/httpd'); |
| | | |
| | | if(is_file('/etc/suphp/suphp.conf')) { |
| | | replaceLine('/etc/suphp.conf','php=php:/srv/www/cgi-bin/php5','x-httpd-suphp=php:/srv/www/cgi-bin/php5',0); |
| | | replaceLine('/etc/suphp.conf','docroot=','docroot=/var/clients',0); |
| | | } |
| | | |
| | | // Sites enabled and avaulable dirs |
| | | exec('mkdir -p '.$conf['apache']['vhost_conf_enabled_dir']); |
| | | exec('mkdir -p '.$conf['apache']['vhost_conf_dir']); |
| | | |
| | | $content = rf('/etc/apache2/httpd.conf'); |
| | | if(!stristr($content,'Include /etc/apache2/sites-enabled/')) { |
| | | af('/etc/apache2/httpd.conf',"\nInclude /etc/apache2/sites-enabled/\n\n"); |
| | | af('/etc/apache2/httpd.conf',"\n<Directory /srv/www>\n Options FollowSymlinks\n</Directory>\n\nInclude /etc/apache2/sites-enabled/\n\n"); |
| | | } |
| | | unset($content); |
| | | |