From 6439f49fb18891b306f0964860b30b26d285bd73 Mon Sep 17 00:00:00 2001 From: SpudGunMan Date: Fri, 3 Oct 2025 12:28:47 -0700 Subject: [PATCH] Update filemon.py --- modules/filemon.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/filemon.py b/modules/filemon.py index 063dd87..53079b3 100644 --- a/modules/filemon.py +++ b/modules/filemon.py @@ -107,12 +107,13 @@ def handleShellCmd(message, message_from_id, channel_number, isDM, deviceID): # Run the shell command as a subprocess try: logger.info(f"FileMon: Running shell command from {message_from_id}: {command}") - result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=10) + result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=10, start_new_session=True) output = result.stdout.strip() if output: return output except Exception as e: logger.warning(f"FileMon: Error running shell command: {e}") + logger.debug(f"FileMon: This command is not good for use over the mesh network") else: logger.debug("FileMon: x: command is disabled by no enable_runShellCmd") return "x: command is disabled"