summaryrefslogtreecommitdiffstats
path: root/dns_wizard/Bind.pm
diff options
context:
space:
mode:
Diffstat (limited to 'dns_wizard/Bind.pm')
-rw-r--r--dns_wizard/Bind.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/dns_wizard/Bind.pm b/dns_wizard/Bind.pm
index 26d745fb..d931aa73 100644
--- a/dns_wizard/Bind.pm
+++ b/dns_wizard/Bind.pm
@@ -25,6 +25,7 @@ use lib qw(/usr/lib/libDrakX);
use strict;
use common;
+use services;
use MDK::Wizard::Wizcommon;
my $wiz = new MDK::Wizard::Wizcommon;
@@ -190,8 +191,12 @@ nb: $ds");
print NEW "domain $wiz_domain_name\n";
print NEW "nameserver $wiz_ip_server\n";
standalone::explanations("$file : domain: $wiz_domain_name nameserver: $wiz_ip_server");
- system("/sbin/chkconfig --level 235 named on");
- system("/etc/rc.d/init.d/named restart");
+ services::start_service_on_boot('named');
+ if (services::is_service_running('named')) {
+ services::restart('named')
+ } else {
+ services::start('named')
+ }
}
sub new {