mirror of
https://github.com/inspec/inspec
synced 2025-02-17 14:38:43 +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)
|
params['SubState'] == 'running' ? (running = true) : (running = false)
|
||||||
# test via systemctl --quiet is-enabled
|
# test via systemctl --quiet is-enabled
|
||||||
# ActiveState values eg.g inactive, active
|
# ActiveState values eg.g inactive, active
|
||||||
params['ActiveState'] == 'active' ? (enabled = true) : (enabled = false)
|
params['UnitFileState'] == 'enabled' ? (enabled = true) : (enabled = false)
|
||||||
|
|
||||||
{
|
{
|
||||||
name: params['Id'],
|
name: params['Id'],
|
||||||
|
|
|
@ -2,5 +2,5 @@ Id=sshd.service
|
||||||
Names=sshd.service
|
Names=sshd.service
|
||||||
Description=OpenSSH server daemon
|
Description=OpenSSH server daemon
|
||||||
LoadState=loaded
|
LoadState=loaded
|
||||||
ActiveState=active
|
UnitFileState=enabled
|
||||||
SubState=running
|
SubState=running
|
||||||
|
|
Loading…
Add table
Reference in a new issue