mirror of
https://github.com/inspec/inspec
synced 2025-03-02 14:27:12 +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
|
# check if the service is running
|
||||||
# if the service is not available or not running, we always get an error code
|
# 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)
|
cmd.exit_status == 0 ? (running = true) : (running = false)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: service_name,
|
name: service_name,
|
||||||
description: '',
|
description: nil,
|
||||||
installed: true,
|
installed: true,
|
||||||
running: running,
|
running: running,
|
||||||
enabled: enabled,
|
enabled: enabled,
|
||||||
|
|
Loading…
Add table
Reference in a new issue