Skip to content
Snippets Groups Projects
Commit 0591596e authored by Stéphane Diemer's avatar Stéphane Diemer
Browse files

Do not check Wowza if disabled

parent 463d6e04
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,7 @@ def main():
errors = 0
# check if wowza is installed
if not check_installed():
if not check_installed_and_enabled():
exit(2)
# check wowza version
......@@ -72,21 +72,26 @@ def main():
exit(0)
def check_installed() -> bool:
'''Check that Wowza is installed.
def check_installed_and_enabled() -> bool:
'''Check that Wowza is installed and enabled.
:return: Exit return codes
:rtype: bool
'''
cmd = 'dpkg --get-selections "wowza*"'
out = subprocess.getoutput(cmd)
out = subprocess.getoutput(cmd).strip()
state = out.split()[-1]
if state != 'install':
lg.info('not installed, skip test')
return False
cmd = 'systemctl is-enabled WowzaStreamingEngine'
out = subprocess.getoutput(cmd).strip()
if not out.endswith('enabled'):
lg.info('not enabled, skip test')
return False
return True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment