summaryrefslogtreecommitdiffstats
path: root/time_wizard/Ntp.pm
diff options
context:
space:
mode:
Diffstat (limited to 'time_wizard/Ntp.pm')
-rw-r--r--time_wizard/Ntp.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/time_wizard/Ntp.pm b/time_wizard/Ntp.pm
index dbc38909..0cf2cf9a 100644
--- a/time_wizard/Ntp.pm
+++ b/time_wizard/Ntp.pm
@@ -209,7 +209,9 @@ sub do_it {
standalone::explanations("Wrote /etc/ntp/step-tickers, starting services");
my @services = qw(crond atd ntpd);
foreach (@services) {
- services::stop($_)
+ if (services::is_service_running($_)) {
+ services::stop($_)
+ }
}
foreach (reverse @services) {
services::start($_)