diff --git a/modules/filemon.py b/modules/filemon.py index 7dfdc72..5106de5 100644 --- a/modules/filemon.py +++ b/modules/filemon.py @@ -61,4 +61,14 @@ async def watch_file(): content = content.replace('\n', ' ').replace('\r', '').strip() if content: return content - await asyncio.sleep(1) # Check every \ No newline at end of file + await asyncio.sleep(1) # Check every + +def call_external_script(message): + # Call an external script runShell.sh + try: + output = os.popen(f"bash runShell.sh {message}").read() + return output + except Exception as e: + logger.warning(f"FileMon: Error calling external script") + return None + \ No newline at end of file