351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
|
# File 'lib/resources/service.rb', line 351
def info(service_name)
status = inspec.command("#{service_ctl} status #{service_name}")
return SysV.new(inspec).info(service_name) if status.exit_status.to_i != 0 || status.stdout == ''
running = !status.stdout[%r{start/running}].nil?
enabled = info_enabled(service_name)
{
name: service_name,
description: nil,
installed: true,
running: running,
enabled: enabled,
type: 'upstart',
}
end
|