mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
Merge pull request #356 from jmccann/systemd_service_enabled_fix
Fix systemd service enabled check
This commit is contained in:
commit
3ef2156138
2 changed files with 2 additions and 2 deletions
|
@ -142,7 +142,7 @@ class Systemd < ServiceManager
|
|||
params['SubState'] == 'running' ? (running = true) : (running = false)
|
||||
# test via systemctl --quiet is-enabled
|
||||
# ActiveState values eg.g inactive, active
|
||||
params['ActiveState'] == 'active' ? (enabled = true) : (enabled = false)
|
||||
params['UnitFileState'] == 'enabled' ? (enabled = true) : (enabled = false)
|
||||
|
||||
{
|
||||
name: params['Id'],
|
||||
|
|
|
@ -2,5 +2,5 @@ Id=sshd.service
|
|||
Names=sshd.service
|
||||
Description=OpenSSH server daemon
|
||||
LoadState=loaded
|
||||
ActiveState=active
|
||||
UnitFileState=enabled
|
||||
SubState=running
|
||||
|
|
Loading…
Reference in a new issue