Skip to content

Commit c3c4fbc

Browse files
author
Till Brehm
committed
Merge branch '6527-add-support-for-debian-12' into 'develop'
Resolve "Add support for Debian 12" Closes #6527 See merge request ispconfig/ispconfig3!1777
2 parents 476b8e8 + b983779 commit c3c4fbc

File tree

12 files changed

+280
-23
lines changed

12 files changed

+280
-23
lines changed
Lines changed: 244 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,244 @@
1+
<?php
2+
3+
/*
4+
Copyright (c) 2023, 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+
//*** Debian 11 default settings
32+
33+
//* Main
34+
$conf['language'] = 'en';
35+
$conf['distname'] = 'debian120';
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+
$conf['default_php'] = "8.2";
47+
48+
//* Services provided by this server, this selection will be overridden by the expert mode
49+
$conf['services']['mail'] = true;
50+
$conf['services']['web'] = true;
51+
$conf['services']['dns'] = true;
52+
$conf['services']['file'] = true;
53+
$conf['services']['db'] = true;
54+
$conf['services']['vserver'] = true;
55+
$conf['services']['proxy'] = false;
56+
$conf['services']['firewall'] = false;
57+
58+
//* MySQL
59+
$conf['mysql']['installed'] = false; // will be detected automatically during installation
60+
$conf['mysql']['init_script'] = 'mysql';
61+
$conf['mysql']['host'] = 'localhost';
62+
$conf['mysql']['ip'] = '127.0.0.1';
63+
$conf['mysql']['port'] = '3306';
64+
$conf['mysql']['database'] = 'dbispconfig';
65+
$conf['mysql']['admin_user'] = 'root';
66+
$conf['mysql']['admin_password'] = '';
67+
$conf['mysql']['charset'] = 'utf8';
68+
$conf['mysql']['ispconfig_user'] = 'ispconfig';
69+
$conf['mysql']['ispconfig_password'] = md5(random_bytes(20));
70+
$conf['mysql']['master_slave_setup'] = 'n';
71+
$conf['mysql']['master_host'] = '';
72+
$conf['mysql']['master_port'] = '3306';
73+
$conf['mysql']['master_database'] = 'dbispconfig';
74+
$conf['mysql']['master_admin_user'] = 'root';
75+
$conf['mysql']['master_admin_password'] = '';
76+
$conf['mysql']['master_ispconfig_user'] = '';
77+
$conf['mysql']['master_ispconfig_password'] = md5(random_bytes(20));
78+
79+
//* Apache
80+
$conf['apache']['installed'] = false; // will be detected automatically during installation
81+
$conf['apache']['user'] = 'www-data';
82+
$conf['apache']['group'] = 'www-data';
83+
$conf['apache']['init_script'] = 'apache2';
84+
$conf['apache']['version'] = '2.4';
85+
$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
86+
$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
87+
$conf['apache']['vhost_port'] = '8080';
88+
$conf['apache']['php_ini_path_apache'] = '/etc/php/8.2/apache2/php.ini';
89+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/8.2/cgi/php.ini';
90+
91+
//* Website base settings
92+
$conf['web']['website_basedir'] = '/var/www';
93+
$conf['web']['website_path'] = '/var/www/clients/client[client_id]/web[website_id]';
94+
$conf['web']['website_symlinks'] = '/var/www/[website_domain]/:/var/www/clients/client[client_id]/[website_domain]/';
95+
96+
//* Apps base settings
97+
$conf['web']['apps_vhost_ip'] = '_default_';
98+
$conf['web']['apps_vhost_port'] = '8081';
99+
$conf['web']['apps_vhost_servername'] = '';
100+
$conf['web']['apps_vhost_user'] = 'ispapps';
101+
$conf['web']['apps_vhost_group'] = 'ispapps';
102+
103+
//* Fastcgi
104+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/8.2/cgi/';
105+
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
106+
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
107+
108+
//* Postfix
109+
$conf['postfix']['installed'] = false; // will be detected automatically during installation
110+
$conf['postfix']['config_dir'] = '/etc/postfix';
111+
$conf['postfix']['init_script'] = 'postfix';
112+
$conf['postfix']['user'] = 'postfix';
113+
$conf['postfix']['group'] = 'postfix';
114+
$conf['postfix']['vmail_userid'] = '5000';
115+
$conf['postfix']['vmail_username'] = 'vmail';
116+
$conf['postfix']['vmail_groupid'] = '5000';
117+
$conf['postfix']['vmail_groupname'] = 'vmail';
118+
$conf['postfix']['vmail_mailbox_base'] = '/var/vmail';
119+
120+
//* Mailman
121+
$conf['mailman']['installed'] = false; // will be detected automatically during installation
122+
$conf['mailman']['config_dir'] = '/etc/mailman';
123+
$conf['mailman']['init_script'] = 'mailman';
124+
125+
//* mlmmj
126+
$conf['mlmmj']['installed'] = false; // will be detected automatically during installation
127+
$conf['mlmmj']['config_dir'] = '/etc/mlmmj';
128+
129+
//* Getmail
130+
$conf['getmail']['installed'] = false; // will be detected automatically during installation
131+
$conf['getmail']['config_dir'] = '/etc/getmail';
132+
$conf['getmail']['program'] = '/usr/bin/getmail';
133+
134+
//* Courier
135+
$conf['courier']['installed'] = false; // will be detected automatically during installation
136+
$conf['courier']['config_dir'] = '/etc/courier';
137+
$conf['courier']['courier-authdaemon'] = 'courier-authdaemon';
138+
$conf['courier']['courier-imap'] = 'courier-imap';
139+
$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl';
140+
$conf['courier']['courier-pop'] = 'courier-pop';
141+
$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl';
142+
143+
//* Dovecot
144+
$conf['dovecot']['installed'] = false; // will be detected automatically during installation
145+
$conf['dovecot']['config_dir'] = '/etc/dovecot';
146+
$conf['dovecot']['init_script'] = 'dovecot';
147+
148+
//* SASL
149+
$conf['saslauthd']['installed'] = false; // will be detected automatically during installation
150+
$conf['saslauthd']['config'] = '/etc/default/saslauthd';
151+
$conf['saslauthd']['init_script'] = 'saslauthd';
152+
153+
//* Amavisd
154+
$conf['amavis']['installed'] = false; // will be detected automatically during installation
155+
$conf['amavis']['config_dir'] = '/etc/amavis';
156+
$conf['amavis']['init_script'] = 'amavis';
157+
158+
//* Rspamd
159+
$conf['rspamd']['installed'] = false; // will be detected automatically during installation
160+
$conf['rspamd']['config_dir'] = '/etc/rspamd';
161+
$conf['rspamd']['init_script'] = 'rspamd';
162+
163+
//* ClamAV
164+
$conf['clamav']['installed'] = false; // will be detected automatically during installation
165+
$conf['clamav']['init_script'] = 'clamav-daemon';
166+
167+
//* Pureftpd
168+
$conf['pureftpd']['installed'] = false; // will be detected automatically during installation
169+
$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd';
170+
$conf['pureftpd']['init_script'] = 'pure-ftpd-mysql';
171+
172+
//* MyDNS
173+
$conf['mydns']['installed'] = false; // will be detected automatically during installation
174+
$conf['mydns']['config_dir'] = '/etc';
175+
$conf['mydns']['init_script'] = 'mydns';
176+
177+
//* PowerDNS
178+
$conf['powerdns']['installed'] = false; // will be detected automatically during installation
179+
$conf['powerdns']['database'] = 'powerdns';
180+
$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
181+
$conf['powerdns']['init_script'] = 'pdns';
182+
183+
//* BIND DNS Server
184+
$conf['bind']['installed'] = false; // will be detected automatically during installation
185+
$conf['bind']['bind_user'] = 'root';
186+
$conf['bind']['bind_group'] = 'bind';
187+
$conf['bind']['bind_zonefiles_dir'] = '/etc/bind';
188+
$conf['bind']['named_conf_path'] = '/etc/bind/named.conf';
189+
$conf['bind']['named_conf_local_path'] = '/etc/bind/named.conf.local';
190+
$conf['bind']['init_script'] = 'bind9';
191+
192+
//* Jailkit
193+
$conf['jailkit']['installed'] = false; // will be detected automatically during installation
194+
$conf['jailkit']['config_dir'] = '/etc/jailkit';
195+
$conf['jailkit']['jk_init'] = 'jk_init.ini';
196+
$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini';
197+
$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';
198+
$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php';
199+
200+
//* Squid
201+
$conf['squid']['installed'] = false; // will be detected automatically during installation
202+
$conf['squid']['config_dir'] = '/etc/squid';
203+
$conf['squid']['init_script'] = 'squid';
204+
205+
//* Nginx
206+
$conf['nginx']['installed'] = false; // will be detected automatically during installation
207+
$conf['nginx']['user'] = 'www-data';
208+
$conf['nginx']['group'] = 'www-data';
209+
$conf['nginx']['config_dir'] = '/etc/nginx';
210+
$conf['nginx']['vhost_conf_dir'] = '/etc/nginx/sites-available';
211+
$conf['nginx']['vhost_conf_enabled_dir'] = '/etc/nginx/sites-enabled';
212+
$conf['nginx']['init_script'] = 'nginx';
213+
$conf['nginx']['vhost_port'] = '8080';
214+
$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
215+
$conf['nginx']['php_fpm_init_script'] = 'php8.2-fpm';
216+
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/8.2/fpm/php.ini';
217+
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/8.2/fpm/pool.d';
218+
$conf['nginx']['php_fpm_start_port'] = 9010;
219+
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php8.2-fpm';
220+
221+
//* OpenVZ
222+
$conf['openvz']['installed'] = false;
223+
224+
//*Bastille-Firwall
225+
$conf['bastille']['installed'] = false;
226+
$conf['bastille']['config_dir'] = '/etc/Bastille';
227+
228+
//* vlogger
229+
$conf['vlogger']['config_dir'] = '/etc';
230+
231+
//* cron
232+
$conf['cron']['init_script'] = 'cron';
233+
$conf['cron']['crontab_dir'] = '/etc/cron.d';
234+
$conf['cron']['wget'] = '/usr/bin/wget';
235+
236+
//* Metronome XMPP
237+
$conf['xmpp']['installed'] = false;
238+
$conf['xmpp']['init_script'] = 'metronome';
239+
240+
241+
// AppArmor
242+
$conf['apparmor']['installed'] = false;
243+
244+
?>

install/dist/conf/debiantesting.conf.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
$conf['runlevel'] = '/etc';
4444
$conf['shells'] = '/etc/shells';
4545
$conf['pam'] = '/etc/pam.d';
46-
$conf['default_php'] = "8.1";
46+
$conf['default_php'] = "8.2";
4747

4848
//* Services provided by this server, this selection will be overridden by the expert mode
4949
$conf['services']['mail'] = true;
@@ -85,8 +85,8 @@
8585
$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available';
8686
$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled';
8787
$conf['apache']['vhost_port'] = '8080';
88-
$conf['apache']['php_ini_path_apache'] = '/etc/php/7.4/apache2/php.ini';
89-
$conf['apache']['php_ini_path_cgi'] = '/etc/php/7.4/cgi/php.ini';
88+
$conf['apache']['php_ini_path_apache'] = '/etc/php/8.2/apache2/php.ini';
89+
$conf['apache']['php_ini_path_cgi'] = '/etc/php/8.2/cgi/php.ini';
9090

9191
//* Website base settings
9292
$conf['web']['website_basedir'] = '/var/www';
@@ -101,7 +101,7 @@
101101
$conf['web']['apps_vhost_group'] = 'ispapps';
102102

103103
//* Fastcgi
104-
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/7.4/cgi/';
104+
$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php/8.2/cgi/';
105105
$conf['fastcgi']['fastcgi_starter_path'] = '/var/www/php-fcgi-scripts/[system_user]/';
106106
$conf['fastcgi']['fastcgi_bin'] = '/usr/bin/php-cgi';
107107

@@ -212,11 +212,11 @@
212212
$conf['nginx']['init_script'] = 'nginx';
213213
$conf['nginx']['vhost_port'] = '8080';
214214
$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
215-
$conf['nginx']['php_fpm_init_script'] = 'php7.4-fpm';
216-
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.4/fpm/php.ini';
217-
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.4/fpm/pool.d';
215+
$conf['nginx']['php_fpm_init_script'] = 'php8.2-fpm';
216+
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/8.2/fpm/php.ini';
217+
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/8.2/fpm/pool.d';
218218
$conf['nginx']['php_fpm_start_port'] = 9010;
219-
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.4-fpm';
219+
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php8.2-fpm';
220220

221221
//* OpenVZ
222222
$conf['openvz']['installed'] = false;

install/lib/classes/tpl.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_error.inc.php';
3131
include_once ISPC_INSTALL_ROOT.'/install/lib/classes/tpl_ini.inc.php';
3232

33-
class tpl{
33+
class tpl extends stdClass{
3434

3535
/*-----------------------------------------------------------------------------\
3636
| ATTENTION |

install/lib/install.lib.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,13 @@ function get_distname() {
252252
$distid = 'debian60';
253253
$distbaseid = 'debian';
254254
swriteln("Operating System: Debian 11.0 (Bullseye) or compatible\n");
255+
} elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') {
256+
$distname = 'Debian';
257+
$distver = 'Bookworm';
258+
$distconfid = 'debian120';
259+
$distid = 'debian60';
260+
$distbaseid = 'debian';
261+
swriteln("Operating System: Debian 12.0 (Bookworm) or compatible\n");
255262
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
256263
$distname = 'Debian';
257264
$distver = 'Testing';

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2929
*/
3030

31-
class installer_base {
31+
class installer_base extends stdClass {
3232

3333
var $wb = array();
3434
var $language = 'en';

interface/lib/app.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
/*
4747
Application Class
4848
*/
49-
class app {
49+
class app extends stdClass {
5050

5151
private $_language_inc = 0;
5252
private $_wb;

interface/lib/classes/tpl.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
include_once ISPC_CLASS_PATH.'/tpl_error.inc.php';
3131
include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php';
3232

33-
class tpl{
33+
class tpl extends stdClass{
3434

3535
/*-----------------------------------------------------------------------------\
3636
| ATTENTION |

server/lib/app.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @license bsd-3-clause
5151
* @link empty
5252
**/
53-
class app {
53+
class app extends stdClass {
5454
/** @var array List of modules that have been loaded. */
5555
var $loaded_modules = [];
5656
/** @var array List of plugins that have been loaded. */

server/lib/classes/monitor_tools.inc.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,12 @@ function get_distname() {
231231
$distconfid = 'debian110';
232232
$distid = 'debian60';
233233
$distbaseid = 'debian';
234+
} elseif(substr(trim(file_get_contents('/etc/debian_version')),0,2) == '12') {
235+
$distname = 'Debian';
236+
$distver = 'Bookworm';
237+
$distconfid = 'debian120';
238+
$distid = 'debian60';
239+
$distbaseid = 'debian';
234240
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
235241
$distname = 'Debian';
236242
$distver = 'Testing';

server/lib/classes/tpl.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
include_once ISPC_CLASS_PATH.'/tpl_error.inc.php';
3131
include_once ISPC_CLASS_PATH.'/tpl_ini.inc.php';
3232

33-
class tpl{
33+
class tpl extends stdClass {
3434

3535
/*-----------------------------------------------------------------------------\
3636
| ATTENTION |

0 commit comments

Comments
 (0)