Skip to content

Commit b631194

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents 8c6a470 + 0dfb2d9 commit b631194

20 files changed

+383
-109
lines changed
Lines changed: 230 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,230 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2016, Till Brehm, ISPConfig UG
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without modification,
8+
are permitted provided that the following conditions are met:
9+
10+
* Redistributions of source code must retain the above copyright notice,
11+
this list of conditions and the following disclaimer.
12+
* Redistributions in binary form must reproduce the above copyright notice,
13+
this list of conditions and the following disclaimer in the documentation
14+
and/or other materials provided with the distribution.
15+
* Neither the name of ISPConfig nor the names of its contributors
16+
may be used to endorse or promote products derived from this software without
17+
specific prior written permission.
18+
19+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22+
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
23+
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
24+
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
26+
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
27+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
28+
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29+
*/
30+
31+
//*** Ubuntu 16.04 default settings
32+
33+
//* Main
34+
$conf['language'] = 'en';
35+
$conf['distname'] = 'ubuntu1604';
36+
$conf['hostname'] = 'server1.domain.tld'; // Full hostname
37+
$conf['ispconfig_install_dir'] = '/usr/local/ispconfig';
38+
$conf['ispconfig_config_dir'] = '/usr/local/ispconfig';
39+
$conf['ispconfig_log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error
40+
$conf['ispconfig_log_dir'] = '/var/log/ispconfig';
41+
$conf['server_id'] = 1;
42+
$conf['init_scripts'] = '/etc/init.d';
43+
$conf['runlevel'] = '/etc';
44+
$conf['shells'] = '/etc/shells';
45+
$conf['pam'] = '/etc/pam.d';
46+
47+
//* Services provided by this server, this selection will be overridden by the expert mode
48+
$conf['services']['mail'] = true;
49+
$conf['services']['web'] = true;
50+
$conf['services']['dns'] = true;
51+
$conf['services']['file'] = true;
52+
$conf['services']['db'] = true;
53+
$conf['services']['vserver'] = true;
54+
$conf['services']['proxy'] = false;
55+
$conf['services']['firewall'] = false;
56+
57+
//* MySQL
58+
$conf['mysql']['installed'] = false; // will be detected automatically during installation
59+
$conf['mysql']['init_script'] = 'mysql';
60+
$conf['mysql']['host'] = 'localhost';
61+
$conf['mysql']['ip'] = '127.0.0.1';
62+
$conf['mysql']['port'] = '3306';
63+
$conf['mysql']['database'] = 'dbispconfig';
64+
$conf['mysql']['admin_user'] = 'root';
65+
$conf['mysql']['admin_password'] = '';
66+
$conf['mysql']['charset'] = 'utf8';
67+
$conf['mysql']['ispconfig_user'] = 'ispconfig';
68+
$conf['mysql']['ispconfig_password'] = md5(uniqid(rand()));
69+
$conf['mysql']['master_slave_setup'] = 'n';
70+
$conf['mysql']['master_host'] = '';
71+
$conf['mysql']['master_database'] = 'dbispconfig';
72+
$conf['mysql']['master_admin_user'] = 'root';
73+
$conf['mysql']['master_admin_password'] = '';
74+
$conf['mysql']['master_ispconfig_user'] = '';
75+
$conf['mysql']['master_ispconfig_password'] = md5(uniqid(rand()));
76+
77+
//* Apache
78+
$conf['apache']['installed'] = false; // will be detected automatically during installation
79+
$conf['apache']['user'] = 'www-data';
80+
$conf['apache']['group'] = 'www-data';
81+
$conf['apache']['init_script'] = 'apache2';
82+
$conf['apache']['version'] = '2.4';
83+
$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
84+
$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
85+
$conf['apache']['vhost_port'] = '8080';
86+
$conf['apache']['php_ini_path_apache'] = '/etc/php/7.0/apache2/php.ini';
87+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.0/cgi/php.ini';
88+
89+
//* Website base settings
90+
$conf['web']['website_basedir'] = '/var/www';
91+
$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
92+
$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
93+
94+
//* Apps base settings
95+
$conf['web']['apps_vhost_ip'] = '_default_';
96+
$conf['web']['apps_vhost_port'] = '8081';
97+
$conf['web']['apps_vhost_servername'] = '';
98+
$conf['web']['apps_vhost_user'] = 'ispapps';
99+
$conf['web']['apps_vhost_group'] = 'ispapps';
100+
101+
//* Fastcgi
102+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.0/cgi/';
103+
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
104+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
105+
106+
//* Postfix
107+
$conf['postfix']['installed'] = false; // will be detected automatically during installation
108+
$conf['postfix']['config_dir'] = '/etc/postfix';
109+
$conf['postfix']['init_script'] = 'postfix';
110+
$conf['postfix']['user'] = 'postfix';
111+
$conf['postfix']['group'] = 'postfix';
112+
$conf['postfix']['vmail_userid'] = '5000';
113+
$conf['postfix']['vmail_username'] = 'vmail';
114+
$conf['postfix']['vmail_groupid'] = '5000';
115+
$conf['postfix']['vmail_groupname'] = 'vmail';
116+
$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
117+
118+
//* Mailman
119+
$conf['mailman']['installed'] = false; // will be detected automatically during installation
120+
$conf['mailman']['config_dir'] = '/etc/mailman';
121+
$conf['mailman']['init_script'] = 'mailman';
122+
123+
//* Getmail
124+
$conf['getmail']['installed'] = false; // will be detected automatically during installation
125+
$conf['getmail']['config_dir'] = '/etc/getmail';
126+
$conf['getmail']['program'] = '/usr/bin/getmail';
127+
128+
//* Courier
129+
$conf['courier']['installed'] = false; // will be detected automatically during installation
130+
$conf['courier']['config_dir'] = '/etc/courier';
131+
$conf['courier']['courier-authdaemon'] = 'courier-authdaemon';
132+
$conf['courier']['courier-imap'] = 'courier-imap';
133+
$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl';
134+
$conf['courier']['courier-pop'] = 'courier-pop';
135+
$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl';
136+
137+
//* Dovecot
138+
$conf['dovecot']['installed'] = false; // will be detected automatically during installation
139+
$conf['dovecot']['config_dir'] = '/etc/dovecot';
140+
$conf['dovecot']['init_script'] = 'dovecot';
141+
142+
//* SASL
143+
$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
144+
$conf['saslauthd']['config'] = '/etc/default/saslauthd';
145+
$conf['saslauthd']['init_script'] = 'saslauthd';
146+
147+
//* Amavisd
148+
$conf['amavis']['installed'] = false; // will be detected automatically during installation
149+
$conf['amavis']['config_dir'] = '/etc/amavis';
150+
$conf['amavis']['init_script'] = 'amavis';
151+
152+
//* ClamAV
153+
$conf['clamav']['installed'] = false; // will be detected automatically during installation
154+
$conf['clamav']['init_script'] = 'clamav-daemon';
155+
156+
//* Pureftpd
157+
$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
158+
$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
159+
$conf['pureftpd']['init_script'] = 'pure-ftpd-mysql';
160+
161+
//* MyDNS
162+
$conf['mydns']['installed'] = false; // will be detected automatically during installation
163+
$conf['mydns']['config_dir'] = '/etc';
164+
$conf['mydns']['init_script'] = 'mydns';
165+
166+
//* PowerDNS
167+
$conf['powerdns']['installed'] = false; // will be detected automatically during installation
168+
$conf['powerdns']['database'] = 'powerdns';
169+
$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
170+
$conf['powerdns']['init_script'] = 'pdns';
171+
172+
//* BIND DNS Server
173+
$conf['bind']['installed'] = false; // will be detected automatically during installation
174+
$conf['bind']['bind_user'] = 'root';
175+
$conf['bind']['bind_group'] = 'bind';
176+
$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
177+
$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
178+
$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
179+
$conf['bind']['init_script'] = 'bind9';
180+
181+
//* Jailkit
182+
$conf['jailkit']['installed'] = false; // will be detected automatically during installation
183+
$conf['jailkit']['config_dir'] = '/etc/jailkit';
184+
$conf['jailkit']['jk_init'] = 'jk_init.ini';
185+
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
186+
$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/lesspipe /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico /usr/bin/mysql /usr/bin/mysqldump /usr/bin/git /usr/bin/git-receive-pack /usr/bin/git-upload-pack /usr/bin/unzip /usr/bin/zip /bin/tar /bin/rm /usr/bin/patch';
187+
$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
188+
189+
//* Squid
190+
$conf['squid']['installed'] = false; // will be detected automatically during installation
191+
$conf['squid']['config_dir'] = '/etc/squid';
192+
$conf['squid']['init_script'] = 'squid';
193+
194+
//* Nginx
195+
$conf['nginx']['installed'] = false; // will be detected automatically during installation
196+
$conf['nginx']['user'] = 'www-data';
197+
$conf['nginx']['group'] = 'www-data';
198+
$conf['nginx']['config_dir'] = '/etc/nginx';
199+
$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
200+
$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
201+
$conf['nginx']['init_script'] = 'nginx';
202+
$conf['nginx']['vhost_port'] = '8080';
203+
$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
204+
$conf['nginx']['php_fpm_init_script'] = 'php7.0-fpm';
205+
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.0/fpm/php.ini';
206+
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d';
207+
$conf['nginx']['php_fpm_start_port'] = 9010;
208+
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm';
209+
210+
//* OpenVZ
211+
$conf['openvz']['installed'] = false;
212+
213+
//*Bastille-Firwall
214+
$conf['bastille']['installed'] = false;
215+
$conf['bastille']['config_dir'] = '/etc/Bastille';
216+
217+
//* vlogger
218+
$conf['vlogger']['config_dir'] = '/etc';
219+
220+
//* cron
221+
$conf['cron']['init_script'] = 'cron';
222+
$conf['cron']['crontab_dir'] = '/etc/cron.d';
223+
$conf['cron']['wget'] = '/usr/bin/wget';
224+
225+
//* Metronome XMPP
226+
$conf['xmpp']['installed'] = false;
227+
$conf['xmpp']['init_script'] = 'metronome';
228+
229+
230+
?>

install/dist/lib/ubuntu1604.lib.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

install/lib/install.lib.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ function get_distname() {
200200
$distid = 'debian60';
201201
$distbaseid = 'debian';
202202
swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n");
203+
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
204+
$distname = 'Debian';
205+
$distver = 'Testing';
206+
$distid = 'debian60';
207+
$distconfid = 'debiantesting';
208+
$distbaseid = 'debian';
209+
swriteln("Operating System: Debian Testing\n");
203210
} else {
204211
$distname = 'Debian';
205212
$distver = 'Unknown';

install/lib/installer_base.lib.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function configure_database() {
224224
if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
225225
echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
226226
echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
227-
echo"to the mysqld-section in /etc/mysql/my.cnf and restart mysqld afterwards\n";
227+
echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n";
228228
die();
229229
}
230230

@@ -296,6 +296,7 @@ public function add_database_server_record() {
296296
$tpl_ini_array['fastcgi']['fastcgi_bin'] = $conf['fastcgi']['fastcgi_bin'];
297297
$tpl_ini_array['server']['hostname'] = $conf['hostname'];
298298
$tpl_ini_array['server']['ip_address'] = @gethostbyname($conf['hostname']);
299+
$tpl_ini_array['server']['firewall'] = ($conf['ufw']['installed'] == true)?'ufw':'bastille';
299300
$tpl_ini_array['web']['website_basedir'] = $conf['web']['website_basedir'];
300301
$tpl_ini_array['web']['website_path'] = $conf['web']['website_path'];
301302
$tpl_ini_array['web']['website_symlinks'] = $conf['web']['website_symlinks'];

install/lib/update.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ function updateDbAndIni() {
128128
if ($check_sql_mode['@@sql_mode'] != '' && $check_sql_mode['@@sql_mode'] != 'NO_ENGINE_SUBSTITUTION') {
129129
echo "Wrong SQL-mode. You should use NO_ENGINE_SUBSTITUTION. Add\n\n";
130130
echo " sql-mode=\"NO_ENGINE_SUBSTITUTION\"\n\n";
131-
echo"to the mysqld-section in /etc/mysql/my.cnf and restart mysqld afterwards\n";
131+
echo"to the mysqld-section in your mysql-config and restart mysqld afterwards\n";
132132
die();
133133
}
134134

interface/lib/classes/tform_base.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1002,7 +1002,7 @@ function validateField($field_name, $field_value, $validators) {
10021002
unset($error);
10031003
break;
10041004
case 'ISINT':
1005-
if(function_exists('filter_var') && $field_value < 2147483647) {
1005+
if(function_exists('filter_var') && $field_value < PHP_INT_MAX) {
10061006
//if($field_value != '' && filter_var($field_value, FILTER_VALIDATE_INT, array("options" => array('min_range'=>0))) === false) {
10071007
if($field_value != '' && filter_var($field_value, FILTER_VALIDATE_INT) === false) {
10081008
$errmsg = $validator['errmsg'];
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<tmpl_if name="list_head_txt">
2+
<div class='page-header'>
3+
<h1><tmpl_var name="list_head_txt"></h1>
4+
</div>
5+
</tmpl_if>
6+
<tmpl_if name="list_desc_txt"><p><tmpl_var name="list_desc_txt"></p></tmpl_if>
7+
8+
<div class="form-group">
9+
<label for="default_dnsserver" class="col-sm-3 control-label">{tmpl_var name='default_dnsserver_txt'}</label>
10+
<div class="col-sm-9"><select name="default_dnsserver" id="default_dnsserver" class="form-control">
11+
{tmpl_var name='default_dnsserver'}
12+
</select></div>
13+
</div>
14+
15+
<input type="hidden" name="id" value="{tmpl_var name='id'}">
16+
17+
<div class="clear"><div class="right">
18+
<button class="btn btn-default formbutton-success" type="button" value="{tmpl_var name='btn_save_txt'}" data-submit-form="pageForm" data-form-action="admin/system_config_edit.php">{tmpl_var name='btn_save_txt'}</button>
19+
<button class="btn btn-default formbutton-default" type="button" value="{tmpl_var name='btn_cancel_txt'}" data-load-content="admin/users_list.php">{tmpl_var name='btn_cancel_txt'}</button>
20+
</div></div>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?php
22
$wb['available_modules_txt'] = 'Dostępne moduły';
3-
$wb['go_to_txt'] = 'Go to';
3+
$wb['go_to_txt'] = 'Idź do';
44
?>

interface/web/dns/dns_import.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
$line = trim($line);
217217
if ($line != '' && substr($line, 0, 1) != ';'){
218218
if(strpos($line, ";") !== FALSE) {
219-
if (!preg_match("/v=DKIM|v=DMARC/",$line)) {
219+
if(!preg_match("/\"[^\"]+;[^\"]*\"/", $line)) {
220220
$line = substr($line, 0, strpos($line, ";"));
221221
}
222222
}
@@ -267,12 +267,13 @@
267267
$parts = explode(' ', $line);
268268

269269
// make elements lowercase
270-
$dkim=@($parts[3]=='"v=DKIM1;')?true:false;
271-
$dmarc=@($parts[3]=='"v=DMARC1;')?true:false;
272-
273270
$new_parts = array();
274271
foreach($parts as $part){
275-
if(!$dkim && !$dmarc) {
272+
if(
273+
(strpos($part, ';') === false) &&
274+
(!preg_match("/^\"/", $part)) &&
275+
(!preg_match("/\"$/", $part))
276+
) {
276277
$new_parts[] = strtolower($part);
277278
} else {
278279
$new_parts[] = $part;

interface/web/sites/database_quota_stats.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ function prepareDataRow($rec) {
5757
if(!empty($monitor_data[$rec['server_id'].'.'.$database_name])){
5858
$rec['database'] = $monitor_data[$rec['server_id'].'.'.$database_name]['database_name'];
5959
$rec['client'] = $monitor_data[$rec['server_id'].'.'.$database_name]['client'];
60-
$rec['server_name'] = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $rec['server_id'])['server_name'];
60+
$tmp = $app->db->queryOneRecord("SELECT server_name FROM server WHERE server_id = ?", $rec['server_id']);
61+
$rec['server_name'] = $tmp['server_name'];
62+
unset($tmp);
6163
$rec['used'] = $monitor_data[$rec['server_id'].'.'.$database_name]['used'];
6264
$rec['quota'] = $monitor_data[$rec['server_id'].'.'.$database_name]['quota'];
6365

0 commit comments

Comments
 (0)