From 43f61bfc8819f563217ddcaed4b14e2c113b113c Mon Sep 17 00:00:00 2001 From: Alexandre Date: Thu, 21 Jul 2022 15:18:17 +0200 Subject: [PATCH] Accept cookies files --- epicgamesfree/config.json | 2 +- epicgamesfree/rootfs/etc/cont-init.d/99-run.sh | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/epicgamesfree/config.json b/epicgamesfree/config.json index d98d5349a..9ee68d11c 100644 --- a/epicgamesfree/config.json +++ b/epicgamesfree/config.json @@ -12,7 +12,7 @@ ], "name": "Epic Games Free", "ports": { - "3000/tcp": 3001 + "3000/tcp": 3000 }, "ports_description": { "3000/tcp": "web interface" diff --git a/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh b/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh index d26135e71..b9e25f158 100644 --- a/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh +++ b/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh @@ -5,19 +5,22 @@ # Initialize # ############## -# Copy default config.json HOME="/config/addons_config/epicgamesfree" if [ ! -f "$HOME"/config.json ]; then + # Copy default config.json cp /templates/config.json "$HOME"/config.json chmod 777 "$HOME"/config.json bashio::log.warning "A default config.json file was copied in $HOME. Please customize according to https://github.com/claabs/epicgames-freegames-node#json-configuration before restarting the addon" bashio::exit.nok fi -# Make symlink - -if [ -f /usr/app/config/config.json ]; then rm /usr/app/config/config.json; fi -ln -s "$HOME"/config.json /usr/app/config/config.json +# Make symlink for cookies +bashio::log.info "The following json files were found in $HOME and will be used in the app :" +cd "$HOME" || true +for i in *.json; do # Whitespace-safe but not recursive. + echo "... processing $i" + ln -s $i /usr/app/config +done ############## # Launch App #