mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
move cmd assignment - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/112
This commit is contained in:
@@ -4,7 +4,6 @@ import subprocess
|
||||
def check():
|
||||
|
||||
os = __grains__['os']
|
||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||
|
||||
if os == 'Ubuntu':
|
||||
if path.exists('/var/run/reboot-required'):
|
||||
@@ -13,6 +12,7 @@ def check():
|
||||
retval = 'False'
|
||||
|
||||
elif os == 'CentOS':
|
||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||
try:
|
||||
needs_restarting = subprocess.check_call(cmd.split(), shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
|
||||
Reference in New Issue
Block a user