From 4fb842466266f800095ce73611803da70b7d42d5 Mon Sep 17 00:00:00 2001 From: Ayush Tiwari <113542836+ayushtiwari134@users.noreply.github.com> Date: Sun, 29 Dec 2024 19:20:43 +0530 Subject: [PATCH 1/2] fix: resolve config.env directory issue in free_games_claimer add-on (#1655) --- free_games_claimer/rootfs/etc/cont-init.d/99-run.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/free_games_claimer/rootfs/etc/cont-init.d/99-run.sh b/free_games_claimer/rootfs/etc/cont-init.d/99-run.sh index a8d6d8e29..37948e24f 100755 --- a/free_games_claimer/rootfs/etc/cont-init.d/99-run.sh +++ b/free_games_claimer/rootfs/etc/cont-init.d/99-run.sh @@ -19,9 +19,12 @@ else bashio::log.info "Using existing config.env file in $CONFIG_HOME. Please customize according to https://github.com/vogler/free-games-claimer/tree/main#configuration--options and restart the add-on" fi -# Remove erroneous folder named config.env +# Remove erroneous folder named config.env (bug fix for looping issue) if [ -d "$CONFIG_HOME/config.env" ]; then - rm -r "$CONFIG_HOME/config.env" + bashio::log.warning "Found directory named config.env, deleting it..." + rm -rf "$CONFIG_HOME/config.env" # Fix: Ensures directory removal even if it exists + cp /templates/config.env "$CONFIG_HOME/config.env" # Recreate as a valid file + chmod 755 "$CONFIG_HOME/config.env" fi # Copy new file @@ -58,28 +61,22 @@ cd /data || true # Fetch commands CMD_ARGUMENTS="$(bashio::config "CMD_ARGUMENTS")" IFS=';' -# shellcheck disable=SC2162 read -a strarr <<< "$CMD_ARGUMENTS" # Sanitizes commands trim() { local var="$*" - # remove leading whitespace characters var="${var#"${var%%[![:space:]]*}"}" - # remove trailing whitespace characters var="${var%"${var##*[![:space:]]}"}" printf '%s' "$var" } # Add docker-entrypoint command -# Print each value of the array by using the loop for val in "${strarr[@]}"; do - #Removes whitespaces val="$(trim "$val")" echo " " bashio::log.info "Starting the app with arguments \"$val\"" echo " " - # shellcheck disable=SC2086 echo "$val" | xargs docker-entrypoint.sh || true done From 2f4d26f3ef0868dbf9fa58daed193e14aa9b9216 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Dec 2024 14:56:51 +0100 Subject: [PATCH 2/2] Increment version --- free_games_claimer/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/free_games_claimer/config.json b/free_games_claimer/config.json index d09dc522e..344c382f1 100644 --- a/free_games_claimer/config.json +++ b/free_games_claimer/config.json @@ -93,6 +93,6 @@ "slug": "free_games_claimer", "udev": true, "url": "https://github.com/alexbelgium/hassio-addons", - "version": "1.6-5", + "version": "1.6-6", "webui": "[PROTO:ssl]://[HOST]:[PORT:6080]" }