vagrant-landrush / landrush

A Vagrant plugin that provides a simple DNS server for Vagrant guests
MIT License
666 stars 78 forks source link

Centos6: restart_dnsmsq: systemctl command not found #302

Open danielfn opened 7 years ago

danielfn commented 7 years ago

systemd is not used in Centos 6.x distros, so landrush/lib/landrush/cap/host/redhat/restart_dnsmasq.rb fails when it tries to run sudo systemctl restart dnsmasq.

In this case, it should run sudo service dnsmasq restart > /dev/null 2>&1, just like it is done for debian/restart_dnsmasq.rb

bish0polis commented 4 years ago

In fact, '/sbin/service dnsmasq restart' will work on EL boxes from about EL3->EL7 at least.

It's a good accessor-script to the init saveur-du-jour (and ideally will outlast the current fridge-art!).