...
 
Commits (575)

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -101,6 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -101,6 +101,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -112,6 +112,7 @@ $conf['awstats']['buildstaticpages_pl'] = '/usr/bin/awstats_buildstaticpages.pl'
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/cgi-php5';
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/fastcgi/';
$conf['fastcgi']['fastcgi_starter_path'] = '/srv/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -99,6 +99,7 @@ $conf['web']['apps_vhost_group'] = 'ispapps';
//* Fastcgi
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/fastcgi/';
$conf['fastcgi']['fastcgi_starter_path'] = '/srv/www/php-fcgi-scripts/[system_user]/';
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
//* Postfix
$conf['postfix']['installed'] = false; // will be detected automatically during installation
......
......@@ -30,6 +30,83 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class installer extends installer_dist {
public function configure_mailman($status = 'insert') {
global $conf;
$config_dir = $conf['mailman']['config_dir'].'/';
$full_file_name = $config_dir.'mm_cfg.py';
//* Backup exiting file
if(is_file($full_file_name)) {
copy($full_file_name, $config_dir.'mm_cfg.py~');
}
// load files
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
$lines = explode("\n", $old_file);
foreach ($lines as $line)
{
if (trim($line) != '' && substr($line, 0, 1) != '#')
{
@list($key, $value) = @explode("=", $line);
if (!empty($value))
{
$key = rtrim($key);
$old_options[$key] = trim($value);
}
}
}
$config_dir = $conf['mailman']['config_dir'].'/';
$full_file_name = $config_dir.'virtual_to_transport.sh';
//* Backup exiting virtual_to_transport.sh script
if(is_file($full_file_name)) {
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
}
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
} else {
copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
}
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
$virtual_domains = '';
if($status == 'update')
{
// create virtual_domains list
$domainAll = $this->db->queryAllRecords("SELECT domain FROM mail_mailinglist GROUP BY domain");
if(is_array($domainAll)) {
foreach($domainAll as $domain)
{
if ($domainAll[0]['domain'] == $domain['domain'])
$virtual_domains .= "'".$domain['domain']."'";
else
$virtual_domains .= ", '".$domain['domain']."'";
}
}
}
else
$virtual_domains = "' '";
$content = str_replace('{hostname}', $conf['hostname'], $content);
if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = '';
$content = str_replace('{default_language}', $old_options['DEFAULT_SERVER_LANGUAGE'], $content);
$content = str_replace('{virtual_domains}', $virtual_domains, $content);
wf($full_file_name, $content);
}
public function configure_amavis() {
global $conf;
......@@ -37,7 +114,7 @@ class installer extends installer_dist {
$configfile = 'fedora_amavisd_conf';
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
$content = rf("tpl/".$configfile.".master");
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
......@@ -69,7 +146,7 @@ class installer extends installer_dist {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
$content = rf("tpl/master_cf_amavis.master");
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
......
......@@ -30,6 +30,83 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class installer extends installer_dist {
public function configure_mailman($status = 'insert') {
global $conf;
$config_dir = $conf['mailman']['config_dir'].'/';
$full_file_name = $config_dir.'mm_cfg.py';
//* Backup exiting file
if(is_file($full_file_name)) {
copy($full_file_name, $config_dir.'mm_cfg.py~');
}
// load files
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/mm_cfg.py.master', 'tpl/mm_cfg.py.master');
$old_file = rf($full_file_name);
$old_options = array();
$lines = explode("\n", $old_file);
foreach ($lines as $line)
{
if (trim($line) != '' && substr($line, 0, 1) != '#')
{
@list($key, $value) = @explode("=", $line);
if (!empty($value))
{
$key = rtrim($key);
$old_options[$key] = trim($value);
}
}
}
$config_dir = $conf['mailman']['config_dir'].'/';
$full_file_name = $config_dir.'virtual_to_transport.sh';
//* Backup exiting virtual_to_transport.sh script
if(is_file($full_file_name)) {
copy($full_file_name, $config_dir.'virtual_to_transport.sh~');
}
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/mailman-virtual_to_transport.sh', $full_file_name);
} else {
copy('tpl/mailman-virtual_to_transport.sh',$full_file_name);
}
chgrp($full_file_name,'mailman');
chmod($full_file_name,0750);
if(!is_file('/var/lib/mailman/data/transport-mailman')) touch('/var/lib/mailman/data/transport-mailman');
exec('/usr/sbin/postmap /var/lib/mailman/data/transport-mailman');
exec('/usr/lib/mailman/bin/genaliases 2>/dev/null');
$virtual_domains = '';
if($status == 'update')
{
// create virtual_domains list
$domainAll = $this->db->queryAllRecords("SELECT domain FROM mail_mailinglist GROUP BY domain");
if(is_array($domainAll)) {
foreach($domainAll as $domain)
{
if ($domainAll[0]['domain'] == $domain['domain'])
$virtual_domains .= "'".$domain['domain']."'";
else
$virtual_domains .= ", '".$domain['domain']."'";
}
}
}
else
$virtual_domains = "' '";
$content = str_replace('{hostname}', $conf['hostname'], $content);
if(!isset($old_options['DEFAULT_SERVER_LANGUAGE'])) $old_options['DEFAULT_SERVER_LANGUAGE'] = '';
$content = str_replace('{default_language}', $old_options['DEFAULT_SERVER_LANGUAGE'], $content);
$content = str_replace('{virtual_domains}', $virtual_domains, $content);
wf($full_file_name, $content);
}
public function configure_amavis() {
global $conf;
......@@ -38,7 +115,7 @@ class installer extends installer_dist {
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~');
if(!is_dir($conf["amavis"]["config_dir"])) mkdir($conf["amavis"]["config_dir"]);
$content = rf("tpl/".$configfile.".master");
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/'.$configfile.'.master', "tpl/".$configfile.".master");
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
......@@ -70,7 +147,7 @@ class installer extends installer_dist {
// Only add the content if we had not addded it before
if(!stristr($content,"127.0.0.1:10025")) {
unset($content);
$content = rf("tpl/master_cf_amavis.master");
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/master_cf_amavis.master', "tpl/master_cf_amavis.master");
af($conf["postfix"]["config_dir"].'/master.cf',$content);
}
unset($content);
......
......@@ -86,18 +86,26 @@ class installer extends installer_base {
//* Copy dovecot configuration file
if($dovecot_version == 2) {
copy('tpl/debian6_dovecot2.conf.master',$config_dir.'/'.$configfile);
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile);
} else {
copy('tpl/debian6_dovecot2.conf.master',$config_dir.'/'.$configfile);
}
} else {
copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master')) {
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot.conf.master', $config_dir.'/'.$configfile);
} else {
copy('tpl/debian6_dovecot.conf.master',$config_dir.'/'.$configfile);
}
}
//* dovecot-sql.conf
$configfile = 'dovecot-sql.conf';
if(is_file($config_dir.'/'.$configfile)){
copy($config_dir.'/'.$configfile, $config_dir.'/'.$configfile.'~');
chmod($config_dir.'/'.$configfile.'~', 0400);
}
chmod($config_dir.'/'.$configfile.'~', 0400);
$content = rf('tpl/debian6_dovecot-sql.conf.master');
$content = rfsel($conf['ispconfig_install_dir'].'/server/conf-custom/install/debian6_dovecot-sql.conf.master', 'tpl/debian6_dovecot-sql.conf.master');
$content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content);
$content = str_replace('{mysql_server_ispconfig_password}',$conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}',$conf['mysql']['database'],$content);
......@@ -126,4 +134,4 @@ class installer extends installer_base {
}
}
?>
\ No newline at end of file
?>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -34,6 +34,8 @@ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
error_reporting(E_ALL|E_STRICT);
define('INSTALLER_RUN', true);
//** The banner on the command line
echo "\n\n".str_repeat('-',80)."\n";
echo " _____ ___________ _____ __ _ ____
......@@ -106,8 +108,9 @@ $inst->find_installed_apps();
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
$conf['timezone'] = get_system_timezone();
//* Set defaukt theme
//* Set default theme
$conf['theme'] = 'default';
$conf['language_file_import_enabled'] = true;
//** Select installation mode
$install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard');
......@@ -565,7 +568,8 @@ if($install_mode == 'standard') {
}*/
//** Configure ISPConfig :-)
if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),'y')) == 'y') {
$install_ispconfig_interface_default = ($conf['mysql']['master_slave_setup'] == 'y')?'n':'y';
if(strtolower($inst->simple_query('Install ISPConfig Web Interface',array('y','n'),$install_ispconfig_interface_default)) == 'y') {
swriteln('Installing ISPConfig');
//** We want to check if the server is a module or cgi based php enabled server
......