From 96fa3069e6fa08fb782d624263605b185c4556ed Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Tue, 24 Apr 2012 20:10:41 +0000 Subject: services: Use the appropriate tool to start/stop services --- perl-install/services.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'perl-install/services.pm') diff --git a/perl-install/services.pm b/perl-install/services.pm index 179fe0972..f6989806b 100644 --- a/perl-install/services.pm +++ b/perl-install/services.pm @@ -325,7 +325,11 @@ sub _set_service { sub _run_action { my ($service, $action) = @_; - run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", $action); + if (running_systemd()) { + run_program::rooted($::prefix, '/bin/systemctl', $action, "$service.service"); + } else { + run_program::rooted($::prefix, "/etc/rc.d/init.d/$service", $action); + } } sub doit { -- cgit v1.2.1