Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions config.template
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Empty file added etc/data/alert.txt
Empty file.
1 change: 1 addition & 0 deletions modules/filemon.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading