Skip to content

Commit df3a2c0

Browse files
author
Till Brehm
committed
Merge branch 'devuan-basic-support' into 'master'
Add Devuan basic support This merge request adds a basic support for Devuan (www.devuan.org) See merge request !553
2 parents f28674b + 109c839 commit df3a2c0

File tree

11 files changed

+68
-16
lines changed

11 files changed

+68
-16
lines changed

install/lib/install.lib.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,23 @@ function get_distname() {
220220
}
221221
}
222222

223+
//** Devuan
224+
elseif(file_exists('/etc/devuan_version')) {
225+
if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) {
226+
$distname = 'Devuan';
227+
$distver = 'Jessie';
228+
$distid = 'debian60';
229+
$distbaseid = 'debian';
230+
swriteln("Operating System: Devuan 1.0 (Jessie) or compatible\n");
231+
} elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) {
232+
$distname = 'Devuan';
233+
$distver = 'Ceres';
234+
$distid = 'debiantesting';
235+
$distbaseid = 'debian';
236+
swriteln("Operating System: Devuan Unstable (Ceres) or compatible\n");
237+
}
238+
}
239+
223240
//** OpenSuSE
224241
elseif(file_exists('/etc/SuSE-release')) {
225242
if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) {

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1484,7 +1484,7 @@ public function configure_amavis() {
14841484
public function configure_spamassassin() {
14851485
global $conf;
14861486

1487-
//* Enable spamasasssin on debian and ubuntu
1487+
//* Enable spamasasssin on debian, devuan and ubuntu
14881488
$configfile = '/etc/default/spamassassin';
14891489
if(is_file($configfile)) {
14901490
copy($configfile, $configfile.'~');

install/tpl/nginx_apps.vhost.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ server {
9797

9898
# PHP only, required if PHP was built with --enable-force-cgi-redirect
9999
fastcgi_param REDIRECT_STATUS 200;
100-
# To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
100+
# To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used
101101
{use_tcp}fastcgi_pass 127.0.0.1:9000;
102102
{use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock;
103103
fastcgi_index index.php;
@@ -147,7 +147,7 @@ server {
147147

148148
# PHP only, required if PHP was built with --enable-force-cgi-redirect
149149
fastcgi_param REDIRECT_STATUS 200;
150-
# To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
150+
# To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used
151151
{use_tcp}fastcgi_pass 127.0.0.1:9000;
152152
{use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock;
153153
fastcgi_index index.php;

interface/web/admin/lib/lang/en_server_config.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ $wb["named_conf_local_path_txt"] = 'BIND named.conf.local path';
9494
$wb["php_ini_path_cgi_txt"] = 'CGI php.ini path';
9595
$wb["php_ini_path_apache_txt"] = 'Apache php.ini path';
9696
$wb["check_apache_config_txt"] = 'Test apache configuration on restart';
97-
$wb["network_config_warning_txt"] = 'The network configuration option is only available for Debian and Ubuntu Servers. Do not enable this option if your network interface is not eth0.';
97+
$wb["network_config_warning_txt"] = 'The network configuration option is only available for Debian, Devuan and Ubuntu Servers. Do not enable this option if your network interface is not eth0.';
9898
$wb["CA_path_txt"] = 'CA Path';
9999
$wb["CA_pass_txt"] = 'CA passphrase';
100100
$wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax';

interface/web/admin/lib/lang/it_server_config.lng

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ $wb['ufw_default_forward_policy_txt'] = 'Default Forward Policy';
8383
$wb['ufw_default_application_policy_txt'] = 'Default Application Policy';
8484
$wb['ufw_log_level_txt'] = 'Livello di Log';
8585
$wb['website_symlinks_rel_txt'] = 'Make relative symlinks';
86-
$wb['network_config_warning_txt'] = 'L opzione di configurazione di rete è disponibile solo per Debian and Ubuntu Servers. Non abilitare se la tua interfaccia di rete non è eth0.';
86+
$wb['network_config_warning_txt'] = 'L\'opzione di configurazione di rete è disponibile solo per Debian, Devuan e Ubuntu Server. Non abilitare se la tua interfaccia di rete non è eth0.';
8787
$wb['CA_path_txt'] = 'Percorso CA';
8888
$wb['CA_pass_txt'] = 'CA passphrase';
8989
$wb['fastcgi_config_syntax_txt'] = 'Sintassi configurazione FastCGI';

server/conf/nginx_apps.vhost.master

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ server {
8989

9090
# PHP only, required if PHP was built with --enable-force-cgi-redirect
9191
fastcgi_param REDIRECT_STATUS 200;
92-
# To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used
92+
# To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used
9393
{use_tcp}fastcgi_pass 127.0.0.1:9000;
9494
{use_socket}fastcgi_pass unix:{fpm_socket};
9595
fastcgi_index index.php;
@@ -139,7 +139,7 @@ server {
139139

140140
# PHP only, required if PHP was built with --enable-force-cgi-redirect
141141
fastcgi_param REDIRECT_STATUS 200;
142-
# To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used
142+
# To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used
143143
{use_tcp}fastcgi_pass 127.0.0.1:9000;
144144
{use_socket}fastcgi_pass unix:{fpm_socket};
145145
fastcgi_index index.php;

server/lib/classes/cron.d/100-monitor_system_update.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ public function onRunJob() {
7070

7171
$type = 'system_update';
7272

73-
/* This monitoring is only available on Debian or Ubuntu */
74-
if (file_exists('/etc/debian_version')) {
73+
/* This monitoring is only available on Debian, Devuan or Ubuntu */
74+
if (file_exists('/etc/debian_version') || file_exists('/etc/devuan_version')) {
7575

7676
/*
7777
* first update the "apt database"

server/lib/classes/monitor_tools.inc.php

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,21 @@ function get_distname() {
207207
}
208208
}
209209

210+
//** Devuan
211+
elseif(file_exists('/etc/devuan_version')) {
212+
if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) {
213+
$distname = 'Devuan';
214+
$distver = 'Jessie';
215+
$distid = 'debian60';
216+
$distbaseid = 'debian';
217+
} elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) {
218+
$distname = 'Devuan';
219+
$distver = 'Testing';
220+
$distid = 'debiantesting';
221+
$distbaseid = 'debian';
222+
}
223+
}
224+
210225
//** OpenSuSE
211226
elseif(file_exists('/etc/SuSE-release')) {
212227
if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) {
@@ -450,6 +465,8 @@ public function _getLogData($log) {
450465

451466
if (@is_file('/etc/debian_version')) {
452467
$dist = 'debian';
468+
} elseif (@is_file('/etc/devuan_version')) {
469+
$dist = 'devuan';
453470
} elseif (@is_file('/etc/redhat-release')) {
454471
$dist = 'redhat';
455472
} elseif (@is_file('/etc/SuSE-release')) {
@@ -462,6 +479,8 @@ public function _getLogData($log) {
462479
case 'log_mail':
463480
if ($dist == 'debian') {
464481
$logfile = '/var/log/mail.log';
482+
} elseif ($dist == 'devuan') {
483+
$logfile = '/var/log/mail.log';
465484
} elseif ($dist == 'redhat') {
466485
$logfile = '/var/log/maillog';
467486
} elseif ($dist == 'suse') {
@@ -473,6 +492,8 @@ public function _getLogData($log) {
473492
case 'log_mail_warn':
474493
if ($dist == 'debian') {
475494
$logfile = '/var/log/mail.warn';
495+
} elseif ($dist == 'devuan') {
496+
$logfile = '/var/log/mail.warn';
476497
} elseif ($dist == 'redhat') {
477498
$logfile = '/var/log/maillog';
478499
} elseif ($dist == 'suse') {
@@ -484,6 +505,8 @@ public function _getLogData($log) {
484505
case 'log_mail_err':
485506
if ($dist == 'debian') {
486507
$logfile = '/var/log/mail.err';
508+
} elseif ($dist == 'devuan') {
509+
$logfile = '/var/log/mail.err';
487510
} elseif ($dist == 'redhat') {
488511
$logfile = '/var/log/maillog';
489512
} elseif ($dist == 'suse') {
@@ -495,6 +518,8 @@ public function _getLogData($log) {
495518
case 'log_messages':
496519
if ($dist == 'debian') {
497520
$logfile = '/var/log/syslog';
521+
} elseif ($dist == 'devuan') {
522+
$logfile = '/var/log/syslog';
498523
} elseif ($dist == 'redhat') {
499524
$logfile = '/var/log/messages';
500525
} elseif ($dist == 'suse') {
@@ -506,6 +531,8 @@ public function _getLogData($log) {
506531
case 'log_ispc_cron':
507532
if ($dist == 'debian') {
508533
$logfile = $conf['ispconfig_log_dir'] . '/cron.log';
534+
} elseif ($dist == 'devuan') {
535+
$logfile = $conf['ispconfig_log_dir'] . '/cron.log';
509536
} elseif ($dist == 'redhat') {
510537
$logfile = $conf['ispconfig_log_dir'] . '/cron.log';
511538
} elseif ($dist == 'suse') {
@@ -517,6 +544,8 @@ public function _getLogData($log) {
517544
case 'log_freshclam':
518545
if ($dist == 'debian') {
519546
$logfile = '/var/log/clamav/freshclam.log';
547+
} elseif ($dist == 'devuan') {
548+
$logfile = '/var/log/clamav/freshclam.log';
520549
} elseif ($dist == 'redhat') {
521550
$logfile = (is_file('/var/log/clamav/freshclam.log') ? '/var/log/clamav/freshclam.log' : '/var/log/freshclam.log');
522551
} elseif ($dist == 'suse') {
@@ -528,6 +557,8 @@ public function _getLogData($log) {
528557
case 'log_clamav':
529558
if ($dist == 'debian') {
530559
$logfile = '/var/log/clamav/clamav.log';
560+
} elseif ($dist == 'devuan') {
561+
$logfile = '/var/log/clamav/clamav.log';
531562
} elseif ($dist == 'redhat') {
532563
$logfile = (is_file('/var/log/clamav/clamd.log') ? '/var/log/clamav/clamd.log' : '/var/log/maillog');
533564
} elseif ($dist == 'suse') {
@@ -539,6 +570,8 @@ public function _getLogData($log) {
539570
case 'log_fail2ban':
540571
if ($dist == 'debian') {
541572
$logfile = '/var/log/fail2ban.log';
573+
} elseif ($dist == 'devuan') {
574+
$logfile = '/var/log/fail2ban.log';
542575
} elseif ($dist == 'redhat') {
543576
$logfile = '/var/log/fail2ban.log';
544577
} elseif ($dist == 'suse') {
@@ -553,6 +586,8 @@ public function _getLogData($log) {
553586
case 'log_ispconfig':
554587
if ($dist == 'debian') {
555588
$logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log';
589+
} elseif ($dist == 'devuan') {
590+
$logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log';
556591
} elseif ($dist == 'redhat') {
557592
$logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log';
558593
} elseif ($dist == 'suse') {

server/plugins-available/firewall_plugin.inc.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private function ufw_update($event_name, $data) {
205205
} else {
206206
//* Ensure that bastille firewall is stopped
207207
exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null');
208-
if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove');
208+
if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove');
209209

210210
//* Start ufw firewall
211211
exec('ufw --force enable');
@@ -258,12 +258,12 @@ private function bastille_update($event_name, $data) {
258258
exec('ufw disable');
259259
}
260260
exec($conf['init_scripts'] . '/' . 'bastille-firewall restart 2>/dev/null');
261-
if(@is_file('/etc/debian_version')) exec('update-rc.d bastille-firewall defaults');
261+
if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d bastille-firewall defaults');
262262
if(@is_file('/sbin/insserv')) exec('insserv -d bastille-firewall');
263263
$app->log('Restarting the firewall', LOGLEVEL_DEBUG);
264264
} else {
265265
exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null');
266-
if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove');
266+
if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove');
267267
if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall');
268268
$app->log('Stopping the firewall', LOGLEVEL_DEBUG);
269269
}
@@ -275,7 +275,7 @@ private function bastille_delete($event_name, $data) {
275275
global $app, $conf;
276276

277277
exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null');
278-
if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove');
278+
if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove');
279279
if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall');
280280
$app->log('Stopping the firewall', LOGLEVEL_DEBUG);
281281

server/plugins-available/network_settings_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ function update($event_name, $data) {
8686
$server_config['ip_address'] != '0.0.0.0' &&
8787
$server_config['gateway'] != '0.0.0.0') {
8888

89-
if (is_file('/etc/debian_version'))
89+
if (is_file('/etc/debian_version') || is_file('/etc/devuan_version'))
9090
{
9191
copy('/etc/network/interfaces', '/etc/network/interfaces~');
9292

0 commit comments

Comments
 (0)