mirror of
https://github.com/inspec/inspec
synced 2024-12-03 18:09:32 +00:00
improvement: use onestatus instead of status for freebsd, return nil as service description for freebsd
This commit is contained in:
parent
d5d517af0a
commit
9ac2e6e00b
1 changed files with 2 additions and 2 deletions
|
@ -224,12 +224,12 @@ class BSDInit < ServiceManager
|
|||
|
||||
# check if the service is running
|
||||
# if the service is not available or not running, we always get an error code
|
||||
cmd = @vulcano.run_command("service #{service_name} status")
|
||||
cmd = @vulcano.run_command("service #{service_name} onestatus")
|
||||
cmd.exit_status == 0 ? (running = true) : (running = false)
|
||||
|
||||
{
|
||||
name: service_name,
|
||||
description: '',
|
||||
description: nil,
|
||||
installed: true,
|
||||
running: running,
|
||||
enabled: enabled,
|
||||
|
|
Loading…
Reference in a new issue