summaryrefslogtreecommitdiffstats
path: root/common/Wizcommon.pm
diff options
context:
space:
mode:
Diffstat (limited to 'common/Wizcommon.pm')
-rw-r--r--common/Wizcommon.pm12
1 files changed, 11 insertions, 1 deletions
diff --git a/common/Wizcommon.pm b/common/Wizcommon.pm
index 43971713..7e58107a 100644
--- a/common/Wizcommon.pm
+++ b/common/Wizcommon.pm
@@ -27,7 +27,7 @@ use MDK::Common;
use MDK::Wizard::IFCFG;
our @ISA = qw(Exporter);
-our @EXPORT = qw(check_started test_host_domain);
+our @EXPORT = qw(check_started check_starts_on_boot test_host_domain);
my $net;
@@ -51,6 +51,16 @@ sub check_started {
}
}
+sub check_starts_on_boot($$) {
+ my ($in, $servicename) = @_;
+ if (!services::starts_on_boot($servicename)) {
+ my $start_service = $in->ask_yesorno(N("Start %s server on boot", $servicename), N("Would you like to start the %s service automatically on every boot?", $servicename), 1);
+ if ($start_service) {
+ services::start_service_on_boot($servicename);
+ }
+ }
+}
+
sub test_host_domain {
my ($SHORTHOSTNAME, $DOMAINNAME) = @_;
if ($SHORTHOSTNAME =~ /localhost/) {