From 093e5e478a5e061881530e70206fc5b2be69dd6f Mon Sep 17 00:00:00 2001 From: Amolith Date: Tue, 1 Jul 2025 19:33:27 -0600 Subject: [PATCH] fix: prevent redundant event processing The `tail -n 0` option ensures that the script only processes new lines appended to the log file after the script has started, preventing re-processing of existing file content on startup. --- mumblingherald | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mumblingherald b/mumblingherald index d14f294fa306bd76f40263afd63fa1374e9c6adb..7c2ab87c4339a6bd8f28bb8fb03358c9b02e2e54 100755 --- a/mumblingherald +++ b/mumblingherald @@ -210,7 +210,7 @@ fi # Start tailing the log file and processing events echo "👂 *herald puts ear to the wall and begins listening intently*" -tail -F "$MUMBLE_LOG_FILE" | while read -r line; do +tail -F -n 0 "$MUMBLE_LOG_FILE" | while read -r line; do # Process lines that contain "Moved" or "Connection closed" events if [[ "$line" == *"Moved"* ]]; then parse_move_event "$line"