diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index c58ca51ef8cd72b08635f08ed994b8160f522697..2f601e31c33e90d05ce129932ab6bd70dee4656d 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -220,6 +220,23 @@ function get_distname() { } } + //** Devuan + elseif(file_exists('/etc/devuan_version')) { + if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) { + $distname = 'Devuan'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; + swriteln("Operating System: Devuan 1.0 (Jessie) or compatible\n"); + } elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) { + $distname = 'Devuan'; + $distver = 'Ceres'; + $distid = 'debiantesting'; + $distbaseid = 'debian'; + swriteln("Operating System: Devuan Unstable (Ceres) or compatible\n"); + } + } + //** OpenSuSE elseif(file_exists('/etc/SuSE-release')) { if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) { diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index 8e328228cae6a1adaeb2b053a40fa68fe66a9282..05ff5e4483e6f653ca60a2e3204fa39ece40b3f0 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -1484,7 +1484,7 @@ class installer_base { public function configure_spamassassin() { global $conf; - //* Enable spamasasssin on debian and ubuntu + //* Enable spamasasssin on debian, devuan and ubuntu $configfile = '/etc/default/spamassassin'; if(is_file($configfile)) { copy($configfile, $configfile.'~'); diff --git a/install/tpl/nginx_apps.vhost.master b/install/tpl/nginx_apps.vhost.master index e1bb6d1849d40e2eb3681ac807c98860f07f6c1c..701f3defb1db35963a2c7a04f7b3fe097f8b968b 100644 --- a/install/tpl/nginx_apps.vhost.master +++ b/install/tpl/nginx_apps.vhost.master @@ -97,7 +97,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used + # To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; @@ -147,7 +147,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used + # To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; diff --git a/interface/web/admin/lib/lang/en_server_config.lng b/interface/web/admin/lib/lang/en_server_config.lng index eb55088eb2edbc581f5b29acd3b6d263e0609f09..42dfd8a6b0acd2a789289ce7f38306012b43146e 100644 --- a/interface/web/admin/lib/lang/en_server_config.lng +++ b/interface/web/admin/lib/lang/en_server_config.lng @@ -94,7 +94,7 @@ $wb["named_conf_local_path_txt"] = 'BIND named.conf.local path'; $wb["php_ini_path_cgi_txt"] = 'CGI php.ini path'; $wb["php_ini_path_apache_txt"] = 'Apache php.ini path'; $wb["check_apache_config_txt"] = 'Test apache configuration on restart'; -$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.'; +$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.'; $wb["CA_path_txt"] = 'CA Path'; $wb["CA_pass_txt"] = 'CA passphrase'; $wb["fastcgi_config_syntax_txt"] = 'FastCGI config syntax'; diff --git a/interface/web/admin/lib/lang/it_server_config.lng b/interface/web/admin/lib/lang/it_server_config.lng index 6db41c8b7ab00cef8a1708188e412704f4e0ffa5..5e234fb214a0b1a245a33a78e872af70a870e229 100644 --- a/interface/web/admin/lib/lang/it_server_config.lng +++ b/interface/web/admin/lib/lang/it_server_config.lng @@ -83,7 +83,7 @@ $wb['ufw_default_forward_policy_txt'] = 'Default Forward Policy'; $wb['ufw_default_application_policy_txt'] = 'Default Application Policy'; $wb['ufw_log_level_txt'] = 'Livello di Log'; $wb['website_symlinks_rel_txt'] = 'Make relative symlinks'; -$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.'; +$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.'; $wb['CA_path_txt'] = 'Percorso CA'; $wb['CA_pass_txt'] = 'CA passphrase'; $wb['fastcgi_config_syntax_txt'] = 'Sintassi configurazione FastCGI'; diff --git a/server/conf/nginx_apps.vhost.master b/server/conf/nginx_apps.vhost.master index ed5e3a49ae5160842cfbc25bbd25e7e22f6c4822..75daa4df8f1692f48eacca62c217583473d9cbbf 100644 --- a/server/conf/nginx_apps.vhost.master +++ b/server/conf/nginx_apps.vhost.master @@ -89,7 +89,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access phpMyAdmin, the default user (like www-data on Debian/Ubuntu) must be used + # To access phpMyAdmin, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:{fpm_socket}; fastcgi_index index.php; @@ -139,7 +139,7 @@ server { # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; - # To access SquirrelMail, the default user (like www-data on Debian/Ubuntu) must be used + # To access SquirrelMail, the default user (like www-data on Debian/Devuan/Ubuntu) must be used {use_tcp}fastcgi_pass 127.0.0.1:9000; {use_socket}fastcgi_pass unix:{fpm_socket}; fastcgi_index index.php; diff --git a/server/lib/classes/cron.d/100-monitor_system_update.inc.php b/server/lib/classes/cron.d/100-monitor_system_update.inc.php index c610a849432e64942a1bed18baa9e5be140cda8c..f2faeeb551b3ed93c068f2ecf9119c1817cfc355 100644 --- a/server/lib/classes/cron.d/100-monitor_system_update.inc.php +++ b/server/lib/classes/cron.d/100-monitor_system_update.inc.php @@ -70,8 +70,8 @@ class cronjob_monitor_system_update extends cronjob { $type = 'system_update'; - /* This monitoring is only available on Debian or Ubuntu */ - if (file_exists('/etc/debian_version')) { + /* This monitoring is only available on Debian, Devuan or Ubuntu */ + if (file_exists('/etc/debian_version') || file_exists('/etc/devuan_version')) { /* * first update the "apt database" diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 369c98e1dedb1e678b7ae06549ae9d7d246f67d8..2b0252212d3211a1f77b523e34c79b857b8f72e7 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -207,6 +207,21 @@ class monitor_tools { } } + //** Devuan + elseif(file_exists('/etc/devuan_version')) { + if(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'jessie')) { + $distname = 'Devuan'; + $distver = 'Jessie'; + $distid = 'debian60'; + $distbaseid = 'debian'; + } elseif(false !== strpos(trim(file_get_contents('/etc/devuan_version')), 'ceres')) { + $distname = 'Devuan'; + $distver = 'Testing'; + $distid = 'debiantesting'; + $distbaseid = 'debian'; + } + } + //** OpenSuSE elseif(file_exists('/etc/SuSE-release')) { if(stristr(file_get_contents('/etc/SuSE-release'), '11.0')) { @@ -450,6 +465,8 @@ class monitor_tools { if (@is_file('/etc/debian_version')) { $dist = 'debian'; + } elseif (@is_file('/etc/devuan_version')) { + $dist = 'devuan'; } elseif (@is_file('/etc/redhat-release')) { $dist = 'redhat'; } elseif (@is_file('/etc/SuSE-release')) { @@ -462,6 +479,8 @@ class monitor_tools { case 'log_mail': if ($dist == 'debian') { $logfile = '/var/log/mail.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.log'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -473,6 +492,8 @@ class monitor_tools { case 'log_mail_warn': if ($dist == 'debian') { $logfile = '/var/log/mail.warn'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.warn'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -484,6 +505,8 @@ class monitor_tools { case 'log_mail_err': if ($dist == 'debian') { $logfile = '/var/log/mail.err'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/mail.err'; } elseif ($dist == 'redhat') { $logfile = '/var/log/maillog'; } elseif ($dist == 'suse') { @@ -495,6 +518,8 @@ class monitor_tools { case 'log_messages': if ($dist == 'debian') { $logfile = '/var/log/syslog'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/syslog'; } elseif ($dist == 'redhat') { $logfile = '/var/log/messages'; } elseif ($dist == 'suse') { @@ -506,6 +531,8 @@ class monitor_tools { case 'log_ispc_cron': if ($dist == 'debian') { $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; + } elseif ($dist == 'devuan') { + $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; } elseif ($dist == 'redhat') { $logfile = $conf['ispconfig_log_dir'] . '/cron.log'; } elseif ($dist == 'suse') { @@ -517,6 +544,8 @@ class monitor_tools { case 'log_freshclam': if ($dist == 'debian') { $logfile = '/var/log/clamav/freshclam.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/clamav/freshclam.log'; } elseif ($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/freshclam.log') ? '/var/log/clamav/freshclam.log' : '/var/log/freshclam.log'); } elseif ($dist == 'suse') { @@ -528,6 +557,8 @@ class monitor_tools { case 'log_clamav': if ($dist == 'debian') { $logfile = '/var/log/clamav/clamav.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/clamav/clamav.log'; } elseif ($dist == 'redhat') { $logfile = (is_file('/var/log/clamav/clamd.log') ? '/var/log/clamav/clamd.log' : '/var/log/maillog'); } elseif ($dist == 'suse') { @@ -539,6 +570,8 @@ class monitor_tools { case 'log_fail2ban': if ($dist == 'debian') { $logfile = '/var/log/fail2ban.log'; + } elseif ($dist == 'devuan') { + $logfile = '/var/log/fail2ban.log'; } elseif ($dist == 'redhat') { $logfile = '/var/log/fail2ban.log'; } elseif ($dist == 'suse') { @@ -553,6 +586,8 @@ class monitor_tools { case 'log_ispconfig': if ($dist == 'debian') { $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; + } elseif ($dist == 'devuan') { + $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; } elseif ($dist == 'redhat') { $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; } elseif ($dist == 'suse') { diff --git a/server/plugins-available/firewall_plugin.inc.php b/server/plugins-available/firewall_plugin.inc.php index 67ed2379fbbe554b595efceef048c761cbff2667..a12292495190c9ec1d8fe1f4c94d40216e18e188 100644 --- a/server/plugins-available/firewall_plugin.inc.php +++ b/server/plugins-available/firewall_plugin.inc.php @@ -205,7 +205,7 @@ class firewall_plugin { } else { //* Ensure that bastille firewall is stopped exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); //* Start ufw firewall exec('ufw --force enable'); @@ -258,12 +258,12 @@ class firewall_plugin { exec('ufw disable'); } exec($conf['init_scripts'] . '/' . 'bastille-firewall restart 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d bastille-firewall defaults'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d bastille-firewall defaults'); if(@is_file('/sbin/insserv')) exec('insserv -d bastille-firewall'); $app->log('Restarting the firewall', LOGLEVEL_DEBUG); } else { exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall'); $app->log('Stopping the firewall', LOGLEVEL_DEBUG); } @@ -275,7 +275,7 @@ class firewall_plugin { global $app, $conf; exec($conf['init_scripts'] . '/' . 'bastille-firewall stop 2>/dev/null'); - if(@is_file('/etc/debian_version')) exec('update-rc.d -f bastille-firewall remove'); + if(@is_file('/etc/debian_version') || @is_file('/etc/devuan_version')) exec('update-rc.d -f bastille-firewall remove'); if(@is_file('/sbin/insserv')) exec('insserv -r -f bastille-firewall'); $app->log('Stopping the firewall', LOGLEVEL_DEBUG); diff --git a/server/plugins-available/network_settings_plugin.inc.php b/server/plugins-available/network_settings_plugin.inc.php index 5ce6f934b810c64148b997690f57fc4263b41f9c..56a2512d4022bbc927a4d1f6ff0808620125cb55 100644 --- a/server/plugins-available/network_settings_plugin.inc.php +++ b/server/plugins-available/network_settings_plugin.inc.php @@ -86,7 +86,7 @@ class network_settings_plugin { $server_config['ip_address'] != '0.0.0.0' && $server_config['gateway'] != '0.0.0.0') { - if (is_file('/etc/debian_version')) + if (is_file('/etc/debian_version') || is_file('/etc/devuan_version')) { copy('/etc/network/interfaces', '/etc/network/interfaces~'); diff --git a/server/plugins-available/software_update_plugin.inc.php b/server/plugins-available/software_update_plugin.inc.php index 640d7a962b8557f529e6703efcd2d2b39d42104a..3f6ae3d8d195fdb11b9636966a4eb80dce4d8053 100644 --- a/server/plugins-available/software_update_plugin.inc.php +++ b/server/plugins-available/software_update_plugin.inc.php @@ -278,10 +278,10 @@ class software_update_plugin { global $app; //** Debian and compatible Linux distributions - if(file_exists('/etc/debian_version')) { + if(file_exists('/etc/debian_version') || file_exists('/etc/devuan_version')) { exec("aptitude update"); exec("aptitude safe-upgrade -y"); - $app->log('Execeuted Debian / Ubuntu update', LOGLEVEL_DEBUG); + $app->log('Execeuted Debian / Devuan / Ubuntu update', LOGLEVEL_DEBUG); } //** Gentoo Linux