lib/invoker/power/setup/distro/base.rb in invoker-1.2.0 vs lib/invoker/power/setup/distro/base.rb in invoker-1.3.0

- old
+ new

@@ -11,10 +11,13 @@ require "invoker/power/setup/distro/ubuntu" Ubuntu.new when "Fedora" require "invoker/power/setup/distro/redhat" Redhat.new + when "Archlinux" + require "invoker/power/setup/distro/arch" + Arch.new else raise "Your selected distro is not supported by Invoker" end end @@ -30,11 +33,16 @@ def install_required_software raise "Unimplemented" end def restart_services - system("service rinetd restart") - system("service dnsmasq restart") + if Facter[:systemctl] == "true" + system("systemctl restart rinetd") + system("systemctl restart dnsmasq") + else + system("service rinetd restart") + system("service dnsmasq restart") + end end end end end end