phlipper / chef-monit

Chef cookbook for monit package
http://phlippers.net/chef-monit
MIT License
67 stars 69 forks source link

Add Systemd support for debian 8 #82

Closed sonnysideup closed 5 years ago

sonnysideup commented 9 years ago

I really want to start a discussion topic here. It turns out that most major distros are adopting systemd as the default init system (e.g. Debian, Ubuntu, RHEL, CentOS, SUSE).

The changes I added are specifically tied to Debian 8 but perhaps there's a more "inclusive" change that will allow the cookbook consumer to indicate that systemd is the preferred init system. We could always do a programmatic check but that may be slightly more complicated.

Thoughts?

rickhull commented 9 years ago

Big +1 conceptually. I haven't looked at code.

sonnysideup commented 9 years ago

I think the config file looks good but the conditions would have to change in order to cover a wider range of distros.

Here are a couple of approaches:

  1. Detect the init system – http://unix.stackexchange.com/questions/18209/detect-init-system-using-the-shell
  2. Assume adoption based on distro & version – https://en.wikipedia.org/wiki/Systemd