Skip to content

Commit 8cf78b3

Browse files
committed
Merged revisions 2812-2883 from staböe branch.
1 parent 1fd3c0d commit 8cf78b3

File tree

839 files changed

+2410
-1935
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

839 files changed

+2410
-1935
lines changed

install/dist/lib/fedora.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,6 +718,7 @@ public function install_ispconfig()
718718
$content = str_replace('{server_id}', $conf['server_id'], $content);
719719
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
720720
$content = str_replace('{language}', $conf['language'], $content);
721+
$content = str_replace('{timezone}', $conf['timezone'], $content);
721722

722723
wf("$install_dir/interface/lib/$configfile", $content);
723724

@@ -740,6 +741,7 @@ public function install_ispconfig()
740741
$content = str_replace('{server_id}', $conf['server_id'], $content);
741742
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
742743
$content = str_replace('{language}', $conf['language'], $content);
744+
$content = str_replace('{timezone}', $conf['timezone'], $content);
743745

744746
wf("$install_dir/server/lib/$configfile", $content);
745747

@@ -1029,7 +1031,7 @@ public function install_ispconfig()
10291031
// Edit the file Edit the file /etc/sudoers and comment out the requiregetty line, otherwise the backup function will fail
10301032
replaceLine('/etc/sudoers','Defaults requiretty','#Defaults requiretty',0,0);
10311033

1032-
if(is_file($install_dir.'/interface/invoices')) {
1034+
if(is_dir($install_dir.'/interface/invoices')) {
10331035
chmod($install_dir.'/interface/invoices', 0770);
10341036
chown($install_dir.'/interface/invoices', 'ispconfig');
10351037
chgrp($install_dir.'/interface/invoices', 'ispconfig');

install/dist/lib/gentoo.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,7 @@ public function install_ispconfig()
733733
$content = str_replace('{server_id}', $conf['server_id'], $content);
734734
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
735735
$content = str_replace('{language}', $conf['language'], $content);
736+
$content = str_replace('{timezone}', $conf['timezone'], $content);
736737

737738
$this->write_config_file("$install_dir/interface/lib/$configfile", $content);
738739

@@ -866,7 +867,7 @@ public function install_ispconfig()
866867
chgrp($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
867868
}
868869

869-
if(is_file($install_dir.'/interface/invoices')) {
870+
if(is_dir($install_dir.'/interface/invoices')) {
870871
chmod($install_dir.'/interface/invoices', 0770);
871872
chown($install_dir.'/interface/invoices', 'ispconfig');
872873
chgrp($install_dir.'/interface/invoices', 'ispconfig');

install/dist/lib/opensuse.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,7 @@ public function install_ispconfig()
756756
$content = str_replace('{server_id}', $conf['server_id'], $content);
757757
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
758758
$content = str_replace('{language}', $conf['language'], $content);
759+
$content = str_replace('{timezone}', $conf['timezone'], $content);
759760

760761
wf("$install_dir/interface/lib/$configfile", $content);
761762

@@ -778,6 +779,7 @@ public function install_ispconfig()
778779
$content = str_replace('{server_id}', $conf['server_id'], $content);
779780
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
780781
$content = str_replace('{language}', $conf['language'], $content);
782+
$content = str_replace('{timezone}', $conf['timezone'], $content);
781783

782784
wf("$install_dir/server/lib/$configfile", $content);
783785

@@ -1060,7 +1062,7 @@ public function install_ispconfig()
10601062
exec('chmod 744 /usr/local/bin/run-getmail.sh');
10611063
}
10621064

1063-
if(is_file($install_dir.'/interface/invoices')) {
1065+
if(is_dir($install_dir.'/interface/invoices')) {
10641066
chmod($install_dir.'/interface/invoices', 0770);
10651067
chown($install_dir.'/interface/invoices', 'ispconfig');
10661068
chgrp($install_dir.'/interface/invoices', 'ispconfig');

install/install.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@
102102
//** Detect the installed applications
103103
$inst->find_installed_apps();
104104

105-
//** Select the language
105+
//** Select the language and set default timezone
106106
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
107+
$conf['timezone'] = 'UTC';
107108

108109
//** Select installation mode
109110
$install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard');
@@ -127,6 +128,12 @@
127128
$tmp_mysql_server_database = $inst->free_query('MySQL database to create', $conf['mysql']['database']);
128129
$tmp_mysql_server_charset = $inst->free_query('MySQL charset', $conf['mysql']['charset']);
129130

131+
if($install_mode == 'expert') {
132+
swriteln("The next two questions are about the internal ISPConfig database user and password.\nIt is recommended to accept the defaults which are 'ispconfig' as username and a random password.\nIf you use a different password, use only numbers and chars for the password.\n");
133+
$conf['mysql']['ispconfig_user'] = $inst->free_query('ISPConfig mysql database username', $conf['mysql']['ispconfig_user']);
134+
$conf['mysql']['ispconfig_password'] = $inst->free_query('ISPConfig mysql database password', $conf['mysql']['ispconfig_password']);
135+
}
136+
130137
//* Initialize the MySQL server connection
131138
if(@mysql_connect($tmp_mysql_server_host, $tmp_mysql_server_admin_user, $tmp_mysql_server_admin_password)) {
132139
$conf['mysql']['host'] = $tmp_mysql_server_host;

install/lib/installer_base.lib.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1608,6 +1608,7 @@ public function install_ispconfig() {
16081608
$content = str_replace('{server_id}', $conf['server_id'], $content);
16091609
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
16101610
$content = str_replace('{language}', $conf['language'], $content);
1611+
$content = str_replace('{timezone}', $conf['timezone'], $content);
16111612

16121613
wf($install_dir.'/interface/lib/'.$configfile, $content);
16131614

@@ -1630,6 +1631,7 @@ public function install_ispconfig() {
16301631
$content = str_replace('{server_id}', $conf['server_id'], $content);
16311632
$content = str_replace('{ispconfig_log_priority}', $conf['ispconfig_log_priority'], $content);
16321633
$content = str_replace('{language}', $conf['language'], $content);
1634+
$content = str_replace('{timezone}', $conf['timezone'], $content);
16331635

16341636
wf($install_dir.'/server/lib/'.$configfile, $content);
16351637

@@ -1763,7 +1765,7 @@ public function install_ispconfig() {
17631765
chgrp($install_dir.'/server/lib/mysql_clientdb.conf', 'root');
17641766
}
17651767

1766-
if(is_file($install_dir.'/interface/invoices')) {
1768+
if(is_dir($install_dir.'/interface/invoices')) {
17671769
chmod($install_dir.'/interface/invoices', 0770);
17681770
chown($install_dir.'/interface/invoices', 'ispconfig');
17691771
chgrp($install_dir.'/interface/invoices', 'ispconfig');

install/lib/update.lib.php

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,11 @@ function prepareDBDump() {
5656
//if(filesize('existing_db.sql') < 30000) die('Possible problem with dumping the database. We will stop here. Please check the file existing_db.sql');
5757

5858
// create a backup copy of the ispconfig database in the root folder
59-
$backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_h-i').'.sql';
59+
if(isset($conf['backup_path'])) {
60+
$backup_db_name = $conf['backup_path'].'/ispconfig_db_backup.sql';
61+
} else {
62+
$backup_db_name = '/root/ispconfig_db_backup_'.@date('Y-m-d_H-i').'.sql';
63+
}
6064
copy('existing_db.sql',$backup_db_name);
6165
chmod($backup_db_name, 0700);
6266
chown($backup_db_name, 'root');
@@ -164,6 +168,7 @@ function updateDbAndIni() {
164168

165169
//* update the database version in server table
166170
$inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']);
171+
if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']);
167172

168173

169174
//* If ISPConfig Version < 3.0.3, we will do a full db update
@@ -207,6 +212,7 @@ function updateDbAndIni() {
207212

208213
//* update the database version in server table
209214
$inst->db->query("UPDATE ".$conf["mysql"]["database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']);
215+
if($inst->db->dbHost != $inst->dbmaster->dbHost) $inst->dbmaster->query("UPDATE ".$conf["mysql"]["master_database"].".server SET dbversion = '".$current_db_version."' WHERE server_id = ".$conf['server_id']);
210216

211217
if ($conf['powerdns']['installed']) {
212218

@@ -276,7 +282,7 @@ function updateDbAndIni() {
276282
$tpl_ini_array['global']['webserver'] = 'nginx';
277283
}
278284

279-
// update the new template with the old values
285+
//* update the new template with the old values
280286
if(is_array($old_ini_array)) {
281287
foreach($old_ini_array as $tmp_section_name => $tmp_section_content) {
282288
foreach($tmp_section_content as $tmp_var_name => $tmp_var_content) {
@@ -288,6 +294,11 @@ function updateDbAndIni() {
288294
$new_ini = array_to_ini($tpl_ini_array);
289295
$sql = "UPDATE ".$conf["mysql"]["database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id'];
290296
$inst->db->query($sql);
297+
298+
if($inst->db->dbHost != $inst->dbmaster->dbHost) {
299+
$sql = "UPDATE ".$conf["mysql"]["master_database"].".server SET config = '".mysql_real_escape_string($new_ini)."' WHERE server_id = ".$conf['server_id'];
300+
$inst->dbmaster->query($sql);
301+
}
291302
unset($old_ini_array);
292303
unset($tpl_ini_array);
293304
unset($new_ini);

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,6 @@ INSERT INTO `sys_user` (`userid`, `sys_userid`, `sys_groupid`, `sys_perm_user`,
19191919
-- Dumping data for table `sys_config`
19201920
--
19211921

1922-
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.1');
1922+
INSERT INTO sys_config VALUES ('1','db','db_version','3.0.4.2');
19231923

19241924
SET FOREIGN_KEY_CHECKS = 1;

install/tpl/bastille-firewall.cfg.master

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ DNS_SERVERS="{DNS_SERVERS}"
7575
# use the "\" continuation character (so Bastille can change the
7676
# values if it is run more than once)
7777
TRUSTED_IFACES="lo" # MINIMAL/SAFEST
78-
PUBLIC_IFACES="eth+ ppp+ slip+ venet+" # SAFEST
78+
PUBLIC_IFACES="eth+ ppp+ slip+ venet+ bond+" # SAFEST
7979
INTERNAL_IFACES="" # SAFEST
8080

8181

install/tpl/config.inc.php.master

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ $revision = str_replace(array('Revision:','$',' '), '', $svn_revision);
5656

5757
//** Application
5858
define('ISPC_APP_TITLE', 'ISPConfig');
59-
define('ISPC_APP_VERSION', '3.0.4.1');
59+
define('ISPC_APP_VERSION', '3.0.4.2');
6060
define('DEVSYSTEM', 0);
6161

6262

@@ -148,9 +148,10 @@ $conf['theme'] = 'default';
148148
$conf['html_content_encoding'] = 'utf-8'; // example: utf-8, iso-8859-1, ...
149149
$conf['logo'] = 'themes/default/images/ispc_logo.png';
150150

151-
//** Default Language
151+
//** Default Language and Timezone
152152
$conf['language'] = '{language}';
153153
$conf['debug_language'] = false;
154+
$conf['timezone'] = '{timezone}';
154155

155156

156157
//** Misc.

install/tpl/debian6_dovecot.conf.master

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ log_timestamp = "%Y-%m-%d %H:%M:%S "
1212
# ssl_cert_file = /etc/ssl/_.my-domain.tld/_.my-domain.tld.crt
1313
# ssl_key_file = /etc/ssl/_.my-domain.tld/_.my-domain.tld.key
1414

15+
ssl_cert_file = /etc/postfix/smtpd.cert
16+
ssl_key_file = /etc/postfix/smtpd.key
17+
1518
mail_privileged_group = mail
1619

1720
login_greeting = ISPConfig3 IMAP server ready...

0 commit comments

Comments
 (0)