diff --git a/epicgamesfree/CHANGELOG.md b/epicgamesfree/CHANGELOG.md index f9a9807b8..e576e080b 100644 --- a/epicgamesfree/CHANGELOG.md +++ b/epicgamesfree/CHANGELOG.md @@ -1,6 +1,10 @@ +## debian-2025-11-19 (2025-11-19) +- Recreate a default config.json when only a legacy config.yaml is present so upgrades keep a usable configuration file + ## debian-2025-11-18 (2025-11-18) - Restore the default configuration template to config.json with the expected sample values +- Recreate a default config.json when only a legacy config.yaml is present so upgrades keep a usable configuration file ## debian-2025-11-16 (2025-11-16) - Update to latest version from charlocharlie/epicgames-freegames diff --git a/epicgamesfree/config.yaml b/epicgamesfree/config.yaml index 86af233e1..3687cdfb3 100644 --- a/epicgamesfree/config.yaml +++ b/epicgamesfree/config.yaml @@ -86,5 +86,5 @@ schema: slug: epicgamesfree udev: true url: https://github.com/alexbelgium/hassio-addons -version: "debian-2025-11-18" +version: "debian-2025-11-19" webui: "[PROTO:ssl]://[HOST]:[PORT:3000]" diff --git a/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh b/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh index a479de316..33d5a00a9 100755 --- a/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh +++ b/epicgamesfree/rootfs/etc/cont-init.d/99-run.sh @@ -12,15 +12,15 @@ LEGACY_YAML="$HOME/config.yaml" if [ ! -f "$CONFIG_JSON" ]; then if [ -f "$LEGACY_YAML" ]; then - bashio::log.warning "A config.yaml file was found but the add-on expects config.json. Please convert your configuration to JSON as documented upstream." - else - # Copy default config.json - cp /templates/config.json "$CONFIG_JSON" - chmod 755 "$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#configuration and restart the add-on" - sleep 5 - bashio::exit.nok + bashio::log.warning "A legacy config.yaml was found. A default config.json will be created. Please migrate your settings to the new file format and restart the add-on" fi + + # Copy default config.json + cp /templates/config.json "$CONFIG_JSON" + chmod 755 "$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#configuration and restart the add-on" + sleep 5 + bashio::exit.nok else bashio::log.warning "The config.json file found in $HOME will be used. Please customize according to https://github.com/claabs/epicgames-freegames-node#configuration and restart the add-on" fi