From e7f4416f369dc7378d8ec28bbeee3b5099cb85e1 Mon Sep 17 00:00:00 2001 From: icenine451 Date: Sun, 9 Mar 2025 15:31:40 -0400 Subject: [PATCH] Handle a broken symlink for internal logging folder --- functions/global.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/functions/global.sh b/functions/global.sh index a1aee4b8..601ac658 100644 --- a/functions/global.sh +++ b/functions/global.sh @@ -8,6 +8,11 @@ : "${logging_level:=info}" # Initializing the log level variable if not already valued, this will be actually red later from the config file rd_logs_folder="/var/config/retrodeck/logs" # Static location to write all RetroDECK-related logs +if [ -h "$rd_logs_folder" ]; then # Check if internal logging folder is already a symlink + if [ ! -e "$rd_logs_folder" ]; then # Check if internal logging folder symlink is broken + unlink "$rd_logs_folder" # Remove broken symlink so the folder is recreated when sourcing logger.sh + fi +fi source /app/libexec/logger.sh rotate_logs