Update filemon.py

This commit is contained in:
SpudGunMan
2024-12-23 02:55:57 -08:00
parent 0c637226b2
commit 7a9ee27336
+11 -1
View File
@@ -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
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