Commit 7972151d authored by Marius Cramer's avatar Marius Cramer

Merge branch 'stable-3.0.5'

Conflicts:
	install/autoupdate.php
	install/install.php
	install/sql/incremental/upd_0078.sql
	install/sql/ispconfig3.sql
	install/tpl/config.inc.php.master
	install/tpl/debian_postfix.conf.master
	install/tpl/fedora_postfix.conf.master
	install/tpl/gentoo_postfix.conf.master
	install/tpl/opensuse_postfix.conf.master
	interface/lib/classes/db_mysql.inc.php
	interface/lib/classes/remoting.inc.php
	interface/lib/classes/tform.inc.php
	interface/lib/classes/validate_reseller.inc.php
	interface/lib/config.inc.php
	interface/lib/lang/es.lng
	interface/web/admin/lib/lang/de_server_config.lng
	interface/web/admin/lib/lang/en_server_config.lng
	interface/web/admin/lib/lang/es_server_config.lng
	interface/web/admin/lib/lang/fr_server_config.lng
	interface/web/admin/lib/lang/hr_server_config.lng
	interface/web/dns/lib/lang/hr_dns_wizard.lng
	interface/web/mail/lib/lang/hr_mail_user.lng
	interface/web/mail/mail_domain_edit.php
	interface/web/mail/mail_user_edit.php
	interface/web/remote/index.php
	interface/web/sites/database_edit.php
	interface/web/sites/form/database.tform.php
	interface/web/sites/form/web_vhost_subdomain.tform.php
	interface/web/sites/lib/lang/ar_web_childdomain_list.lng
	interface/web/sites/lib/lang/ar_web_vhost_domain_list.lng
	interface/web/sites/lib/lang/cz_web_childdomain.lng
	interface/web/sites/lib/lang/cz_web_subdomain.lng
	interface/web/sites/lib/lang/cz_web_subdomain_list.lng
	interface/web/sites/lib/lang/cz_web_vhost_domain.lng
	interface/web/sites/lib/lang/cz_web_vhost_subdomain_list.lng
	interface/web/sites/lib/lang/de_ftp_user.lng
	interface/web/sites/lib/lang/de_shell_user.lng
	interface/web/sites/lib/lang/en_ftp_user.lng
	interface/web/sites/lib/lang/en_web_childdomain.lng
	interface/web/sites/lib/lang/en_web_domain.lng
	interface/web/sites/lib/lang/es_ftp_user.lng
	interface/web/sites/lib/lang/es_shell_user.lng
	interface/web/sites/lib/lang/es_web_domain.lng
	interface/web/sites/lib/lang/fr_web_subdomain.lng
	interface/web/sites/lib/lang/hr_web_aliasdomain.lng
	interface/web/sites/lib/lang/hr_web_subdomain.lng
	interface/web/sites/lib/lang/hr_web_subdomain_list.lng
	interface/web/sites/lib/lang/hr_web_vhost_domain.lng
	interface/web/sites/lib/lang/hr_web_vhost_subdomain.lng
	interface/web/sites/lib/lang/hr_web_vhost_subdomain_list.lng
	interface/web/sites/lib/lang/se_web_subdomain.lng
	interface/web/sites/lib/lang/se_web_subdomain_list.lng
	interface/web/sites/lib/lang/se_web_vhost_subdomain.lng
	interface/web/sites/lib/lang/se_web_vhost_subdomain_list.lng
	interface/web/sites/web_aliasdomain_edit.php
	interface/web/sites/web_domain_edit.php
	interface/web/sites/web_vhost_subdomain_edit.php
	interface/web/themes/blue/ispconfig_version
	interface/web/themes/default-304/templates/admin/server_config_mail_edit.htm
	interface/web/themes/default-304/templates/admin/system_config_sites_edit.htm
	interface/web/themes/default-304/templates/dns/dns_wizard.htm
	interface/web/themes/default-304/templates/mail/spamfilter_config_mail_edit.htm
	interface/web/themes/default-304/templates/sites/web_vhost_subdomain_advanced.htm
	interface/web/themes/default-304/templates/sites/web_vhost_subdomain_backup.htm
	interface/web/themes/default-304/templates/sites/web_vhost_subdomain_redirect.htm
	interface/web/themes/default-304/templates/sites/web_vhost_subdomain_ssl.htm
	interface/web/themes/default-304/templates/sites/web_vhost_subdomain_stats.htm
	server/conf/vhost.conf.master
	server/cron_daily.php
	server/lib/classes/db_mysql.inc.php
	server/mods-available/monitor_core_module.inc.php
parents 466f06a5 4ca1f82d

Too many changes to show.

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

<?php
$autoinstall['language'] = 'en'; // de, en (default)
$autoinstall['install_mode'] = 'standard'; // standard (default), expert
$autoinstall['hostname'] = 'server1.example.com'; // default
$autoinstall['mysql_hostname'] = 'localhost'; // default: localhost
$autoinstall['mysql_root_user'] = 'root'; // default: root
$autoinstall['mysql_root_password'] = 'howtoforge';
$autoinstall['mysql_database'] = 'dbispconfig'; // default: dbispcongig
$autoinstall['mysql_charset'] = 'utf8'; // default: utf8
$autoinstall['http_server'] = 'nginx'; // apache (default), nginx
$autoinstall['ispconfig_port'] = '8080'; // default: 8080
$autoinstall['ispconfig_use_ssl'] = 'y'; // y (default), n
/* SSL Settings */
$autoinstall['ssl_cert_country'] = 'AU';
$autoinstall['ssl_cert_state'] = 'Some-State';
$autoinstall['ssl_cert_locality'] = 'Chicago';
$autoinstall['ssl_cert_organisation'] = 'Internet Widgits Pty Ltd';
$autoinstall['ssl_cert_organisation_unit'] = 'IT department';
$autoinstall['ssl_cert_common_name'] = $autoinstall['hostname'];
/* optional expert mode settings, needed only for expert mode */
$autoinstall['mysql_ispconfig_user'] = 'ispconfig'; // default: ispconfig
$autoinstall['mysql_ispconfig_password'] = md5(uniqid(rand()));
$autoinstall['join_multiserver_setup'] = 'n'; // y, n (default)
$autoinstall['mysql_master_hostname'] = 'master.example.com';
$autoinstall['mysql_master_root_user'] = 'root';
$autoinstall['mysql_master_root_password'] = 'howtoforge';
$autoinstall['mysql_master_database'] = 'dbispconfig'; // default: dbispconfig
$autoinstall['configure_mail'] = 'y'; // y (default), n
$autoinstall['configure_jailkit'] = 'y'; // y (default), n
$autoinstall['configure_ftp'] = 'y'; // y (default), n
$autoinstall['configure_dns'] = 'y'; // y (default), n
$autoinstall['configure_apache'] = 'y'; // y (default), n
$autoinstall['configure_nginx'] = 'y'; // y (default), n
$autoinstall['configure_firewall'] = 'y'; // y (default), n
$autoinstall['install_ispconfig_web_interface'] = 'y'; // y (default), n
/* optional update settings, needed only for updates */
$autoupdate['do_backup'] = 'yes'; // yes (default), no
$autoupdate['mysql_root_password'] = 'howtoforge';
$autoupdate['mysql_master_hostname'] = 'master.example.com';
$autoupdate['mysql_master_root_user'] = 'root';
$autoupdate['mysql_master_root_password'] = 'howtoforge';
$autoupdate['mysql_master_database'] = 'dbispconfig'; // default: dbispconfig
$autoupdate['reconfigure_permissions_in_master_database'] = 'no'; // no (default), yes
$autoupdate['reconfigure_services'] = 'yes'; // yes (default), no
$autoupdate['ispconfig_port'] = '8080'; // default: 8080
$autoupdate['create_new_ispconfig_ssl_cert'] = 'no'; // no (default), yes
$autoupdate['reconfigure_crontab'] = 'yes'; // yes (default), no
?>
\ No newline at end of file
[install]
language=en
install_mode=standard
hostname=server1.example.com
mysql_hostname=localhost
mysql_root_user=root
mysql_root_password=ispconfig
mysql_database=dbispconfig
mysql_charset=utf8
http_server=apache
ispconfig_port=8080
ispconfig_use_ssl=y
[ssl_cert]
ssl_cert_country=AU
ssl_cert_state=Some-State
ssl_cert_locality=Chicago
ssl_cert_organisation=Internet Widgits Pty Ltd
ssl_cert_organisation_unit=IT department
ssl_cert_common_name=server1.example.com
[expert]
mysql_ispconfig_user=ispconfig
mysql_ispconfig_password=afStEratXBsgatRtsa42CadwhQ
join_multiserver_setup=n
mysql_master_hostname=master.example.com
mysql_master_root_user=root
mysql_master_root_password=ispconfig
mysql_master_database=dbispconfig
configure_mail=y
configure_jailkit=y
configure_ftp=y
configure_dns=y
configure_apache=y
configure_nginx=y
configure_firewall=y
install_ispconfig_web_interface=y
[update]
do_backup=yes
mysql_root_password=ispconfig
mysql_master_hostname=master.example.com
mysql_master_root_user=root
mysql_master_root_password=ispconfig
mysql_master_database=dbispconfig
reconfigure_permissions_in_master_database=no
reconfigure_services=yes
ispconfig_port=8080
create_new_ispconfig_ssl_cert=no
reconfigure_crontab=yes
\ No newline at end of file
This diff is collapsed.
......@@ -124,6 +124,7 @@ class installer extends installer_base {
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
wf($config_dir.'/'.$configfile, $content);
chmod($config_dir.'/'.$configfile, 0600);
......
......@@ -114,7 +114,7 @@ class installer_dist extends installer_base {
function configure_postfix($options = '')
{
global $conf;
global $conf,$autoinstall;
$cf = $conf['postfix'];
$config_dir = $cf['config_dir'];
......@@ -242,8 +242,13 @@ class installer_dist extends installer_base {
if(!stristr($options, 'dont-create-certs')) {
//* Create the SSL certificate
$command = 'cd '.$config_dir.'; '
.'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:2048 -nodes -keyout smtpd.key -keyform PEM -days 365 -x509';
if(AUTOINSTALL){
$command = 'cd '.$config_dir.'; '
."openssl req -new -subj '/C=".escapeshellcmd($autoinstall['ssl_cert_country'])."/ST=".escapeshellcmd($autoinstall['ssl_cert_state'])."/L=".escapeshellcmd($autoinstall['ssl_cert_locality'])."/O=".escapeshellcmd($autoinstall['ssl_cert_organisation'])."/OU=".escapeshellcmd($autoinstall['ssl_cert_organisation_unit'])."/CN=".escapeshellcmd($autoinstall['ssl_cert_common_name'])."' -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509";
} else {
$command = 'cd '.$config_dir.'; '
.'openssl req -new -outform PEM -out smtpd.cert -newkey rsa:4096 -nodes -keyout smtpd.key -keyform PEM -days 3650 -x509';
}
exec($command);
$command = 'chmod o= '.$config_dir.'/smtpd.key';
......@@ -471,6 +476,7 @@ class installer_dist extends installer_base {
$content = str_replace('{mysql_server_ispconfig_password}', $conf['mysql']['ispconfig_password'], $content);
$content = str_replace('{mysql_server_database}', $conf['mysql']['database'], $content);
$content = str_replace('{mysql_server_host}', $conf['mysql']['host'], $content);
$content = str_replace('{server_id}', $conf['server_id'], $content);
wf("$config_dir/$configfile", $content);
exec("chmod 600 $config_dir/$configfile");
......@@ -864,6 +870,31 @@ class installer_dist extends installer_base {
//* copy the ISPConfig server part
$command = "cp -rf ../server $install_dir";
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* Make a backup of the security settings
if(is_file('/usr/local/ispconfig/security/security_settings.ini')) copy('/usr/local/ispconfig/security/security_settings.ini','/usr/local/ispconfig/security/security_settings.ini~');
//* copy the ISPConfig security part
$command = 'cp -rf ../security '.$install_dir;
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* Apply changed security_settings.ini values to new security_settings.ini file
if(is_file('/usr/local/ispconfig/security/security_settings.ini~')) {
$security_settings_old = ini_to_array(file_get_contents('/usr/local/ispconfig/security/security_settings.ini~'));
$security_settings_new = ini_to_array(file_get_contents('/usr/local/ispconfig/security/security_settings.ini'));
if(is_array($security_settings_new) && is_array($security_settings_old)) {
foreach($security_settings_new as $section => $sval) {
if(is_array($sval)) {
foreach($sval as $key => $val) {
if(isset($security_settings_old[$section]) && isset($security_settings_old[$section][$key])) {
$security_settings_new[$section][$key] = $security_settings_old[$section][$key];
}
}
}
}
file_put_contents('/usr/local/ispconfig/security/security_settings.ini',array_to_ini($security_settings_new));
}
}
//* Create a symlink, so ISPConfig is accessible via web
// Replaced by a separate vhost definition for port 8080
......@@ -990,12 +1021,38 @@ class installer_dist extends installer_base {
$this->db->query($sql);
}
//* Chmod the files
$command = "chmod -R 750 $install_dir";
// chown install dir to root and chmod 755
$command = 'chown root:root '.$install_dir;
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
$command = 'chmod 755 '.$install_dir;
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* chown the files to the ispconfig user and group
$command = "chown -R ispconfig:ispconfig $install_dir";
//* Chmod the files and directories in the install dir
$command = 'chmod -R 750 '.$install_dir.'/*';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* chown the interface files to the ispconfig user and group
$command = 'chown -R ispconfig:ispconfig '.$install_dir.'/interface';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* chown the server files to the root user and group
$command = 'chown -R root:root '.$install_dir.'/server';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* chown the security files to the root user and group
$command = 'chown -R root:root '.$install_dir.'/security';
caselog($command.' &> /dev/null', __FILE__, __LINE__, "EXECUTED: $command", "Failed to execute the command $command");
//* chown the security directory and security_settings.ini to root:ispconfig
$command =