Commit 73740bd3 authored by Marius Burkard's avatar Marius Burkard
Browse files

- install unbound instead of bind with --use-unbound, fixes #5

parent ba526902
......@@ -157,6 +157,14 @@ class ISPConfig {
}
}
public static function wantsUnbound() {
if(isset($_GET['use-unbound']) && $_GET['use-unbound']) {
return true;
} else {
return false;
}
}
public static function wantsAmavis() {
if(isset($_GET['use-amavis']) && $_GET['use-amavis']) {
return true;
......@@ -215,6 +223,7 @@ Possible arguments are:
--interactive ->Don\'t install ISPConfig in non-interactive mode. This is needed if you want to use expert mode, e. g. to install a slave server that shall be integrated into an existing multiserver setup.
--use-nginx ->Use nginx webserver instead of apache2
--use-amavis ->Use amavis instead of rspamd for mail filtering
--use-unbound ->Use unbound instead of bind9 for local resolving. Only allowed if --no-dns is set.
--use-php ->Use specific PHP version instead of installing multiple PHP, e.g. --use-php=7.3 (5.6, 7.0, 7.1, 7.2 and 7.3 available).
->--use-php=system disables the sury repository and just installs the system\'s default PHP version.
->CURRENTLY ONLY EITHER --use-php=system OR OMITTING THE ARGUMENT (use all versions) IS SUPPORTED!
......
......@@ -123,7 +123,11 @@ class ISPConfigDebianOS extends ISPConfigBaseOS {
);
if(ISPConfig::shallInstall('local-dns')) {
$packages[] = 'bind9';
if(ISPConfig::wantsUnbound()) {
$packages[] = 'unbound';
} else {
$packages[] = 'bind9';
}
}
if(ISPConfig::shallInstall('mail')) {
......@@ -405,6 +409,11 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
return false;
}
if(ISPConfig::wantsUnbound() && ISPConfig::shallInstall('dns')) {
ISPConfigLog::error('You can only use --use-unbound together with --no-dns as ISPConfig requires Bind when dns is enabled.');
return false;
}
$this->configureApt();
$this->updatePackageList();
......@@ -707,8 +716,13 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
$this->stopService('rspamd');
}
ISPConfigLog::info('(Re)starting Bind.', true);
$this->restartService('bind9');
if(ISPConfig::wantsUnbound()) {
ISPConfigLog::info('(Re)starting unbound.', true);
$this->restartService('unbound');
} else {
ISPConfigLog::info('(Re)starting Bind.', true);
$this->restartService('bind9');
}
ISPConfigLog::info('Disabling spamassassin daemon.', true);
$this->stopService('spamassassin');
......@@ -1216,7 +1230,11 @@ mailman-unsubscribe: "|/var/lib/mailman/mail/mailman unsubscribe mailman"';
);
if(ISPConfig::shallInstall('local-dns')) {
$check_services[] = 'bind9';
if(ISPConfig::wantsUnbound()) {
$check_services[] = 'unbound';
} else {
$check_services[] = 'bind9';
}
}
if(ISPConfig::shallInstall('web')) {
$check_services[] = 'pureftpd';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment