Skip to content

Commit

Permalink
linux: List and count missing default plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
mihawk90 committed Nov 21, 2024
1 parent 4d472a8 commit 6d62736
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions checks/linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,26 @@ def checkDesktopEnvironment(lines):

if (len(desktopEnvironment) > 0):
return [LEVEL_INFO, desktopEnvironment, '']


def checkMissingModules(lines):
isDistroNix = search('Distribution:', lines)

if (len(isDistroNix) <= 0):
return

modulesMissingList = []
modulesCheckList = ('obs-browser.so', 'obs-websocket.so', 'vlc-video.so')

for module in modulesCheckList:
if not search(module, lines):
modulesMissingList.append(module)

if len(modulesMissingList):
modulesMissingString = str(modulesMissingList)
modulesMissingString = modulesMissingString.replace("', '", "</li><li>")
modulesMissingString = modulesMissingString[2:]
modulesMissingString = modulesMissingString[:-2]

return [LEVEL_INFO, "Missing Modules (" + str(len(modulesMissingList)) + ")",
"""You are missing the following default modules:<br><ul><li>""" + modulesMissingString + "</li></ul>"]
1 change: 1 addition & 0 deletions loganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ def doAnalysis(url=None, filename=None):
checkSnapPackage(logLines),
checkX11(logLines),
checkDesktopEnvironment(logLines),
checkMissingModules(logLines),
checkMacPermissions(logLines)
])
messages.extend(checkVideoSettings(logLines))
Expand Down

0 comments on commit 6d62736

Please sign in to comment.