From 24c79d53f7156a457184ad34708f1dcae0178769 Mon Sep 17 00:00:00 2001 From: Varadinsky Date: Tue, 31 Oct 2017 11:15:00 +0100 Subject: [PATCH] select service name by os --- Rex/CMS/Joomla/__module__.pm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Rex/CMS/Joomla/__module__.pm b/Rex/CMS/Joomla/__module__.pm index 26b4160..4978e6d 100644 --- a/Rex/CMS/Joomla/__module__.pm +++ b/Rex/CMS/Joomla/__module__.pm @@ -28,6 +28,12 @@ Rex::Config->register_set_handler("joomla" => sub { $JOOMLA_CONF{$name} = $value; }); +our %service_name = ( + Debian => "apache2", + Ubuntu => "apache2", + CentOS => "httpd", + Mageia => "httpd", +); task prepare => sub { @@ -64,7 +70,9 @@ task prepare => sub { extract $file, chdir => $document_root; - service apache2 => "restart"; + my $service = $service_name{get_operating_system()}; + service $service => "restart"; + }; task config => sub {