mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 01:32:47 +01:00
add OS logic
This commit is contained in:
@@ -10,6 +10,14 @@ def check():
|
||||
if path.exists('/var/run/reboot-required'):
|
||||
retval = 'True'
|
||||
|
||||
elif os == 'CentOS Stream':
|
||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||
|
||||
try:
|
||||
needs_restarting = subprocess.check_call(cmd, shell=True)
|
||||
except subprocess.CalledProcessError:
|
||||
retval = 'True'
|
||||
|
||||
elif os == 'Rocky':
|
||||
cmd = 'needs-restarting -r > /dev/null 2>&1'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user