From e47e4aa8e1fd79b7d79a3fb1fe814c90675f6ac5 Mon Sep 17 00:00:00 2001 From: Kelly <12676665+SpudGunMan@users.noreply.github.com> Date: Thu, 30 Jul 2026 19:09:52 -0700 Subject: [PATCH] fix-filemon (#327) * Update filemon.py * Update config.template * Create alert.txt * Update config.template --- config.template | 4 ++-- etc/data/alert.txt | 0 modules/filemon.py | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 etc/data/alert.txt diff --git a/config.template b/config.template index dc1e1f8..b8b402f 100644 --- a/config.template +++ b/config.template @@ -390,13 +390,13 @@ js8callWatchedCallsigns = [fileMon] filemon_enabled = False # text file to monitor for changes -file_path = alert.txt +file_path = data/alert.txt # channel to send the message to can be 2,3 multiple channels comma separated broadcastCh = 2 # news command will return the contents of a text file enable_read_news = False -news_file_path = ../data/news.txt +news_file_path = data/news.txt # only return a single random (head)line from the news file news_random_line = False # only return random news 'block' (seprated by two newlines) randomly (precidence over news_random_line) diff --git a/etc/data/alert.txt b/etc/data/alert.txt new file mode 100644 index 0000000..e69de29 diff --git a/modules/filemon.py b/modules/filemon.py index 5ac2a73..3e12ff1 100644 --- a/modules/filemon.py +++ b/modules/filemon.py @@ -142,6 +142,7 @@ def write_news(content, append=False): async def watch_file(): # Watch the file for changes and return the new content when it changes if not os.path.exists(file_monitor_file_path): + logger.warning(f"FileMon: File not found: {file_monitor_file_path}") return None else: last_modified_time = os.path.getmtime(file_monitor_file_path)