Sha256: 1d78f3b5de97a8b4107edc98ed98d6a88c7f0f358bea37f350a3d7cd9f4c4325
Contents?: true
Size: 390 Bytes
Versions: 3
Compression:
Stored size: 390 Bytes
Contents
Ohai.plugin(:Services) do provides 'services' def from_cmd(cmd) so = shell_out(cmd) so.stdout.lines end collect_data(:default) do services Mash.new srvs from_cmd('systemctl list-units | grep loaded | grep active | grep running') srvs.each do |srv| name = srv.split.first services[name] = { "action" => 'restart', } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
cupper-0.1.2 | lib/cupper/plugins/ohai/services.rb |
cupper-0.1.1 | lib/cupper/plugins/ohai/services.rb |
cupper-0.1.0 | lib/cupper/plugins/ohai/services.rb |