12 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
9a55232bba Simplify run_on_startup handling for consistency
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2025-12-04 14:45:38 +00:00
copilot-swe-agent[bot]
893e3ced2c Add disable_cron and run_on_startup options to Epic Games Free addon
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2025-12-04 14:44:31 +00:00
copilot-swe-agent[bot]
280f524c49 Initial plan 2025-12-04 14:38:01 +00:00
Alexandre
8db9080895 Revert 2025-12-03 22:27:43 +01:00
Alexandre
b2a354afc9 Nobuild 2025-12-03 22:06:04 +01:00
Alexandre
3cf2942889 Nobuild 2025-12-03 22:05:17 +01:00
Alexandre
9d6334e39a Update version to 25.10.1-3 in config.yaml nobuild 2025-12-03 21:57:53 +01:00
Alexandre
2728ea3924 Nobuild 2025-12-03 21:57:16 +01:00
Alexandre
77e316be3f Update version to 25.8.6 in config.yaml Nobuild 2025-12-02 08:26:20 +01:00
Alexandre
7fbf681105 Update version to 25.8.6 in config.yaml Nobuild 2025-12-02 08:25:35 +01:00
Alexandre
11662fc32b Merge pull request #2250 from alexbelgium/dependabot/github_actions/home-assistant/builder-2025.11.0
Bump home-assistant/builder from 2025.09.0 to 2025.11.0
2025-12-02 07:14:18 +01:00
dependabot[bot]
ff2975d008 Bump home-assistant/builder from 2025.09.0 to 2025.11.0
Bumps [home-assistant/builder](https://github.com/home-assistant/builder) from 2025.09.0 to 2025.11.0.
- [Release notes](https://github.com/home-assistant/builder/releases)
- [Commits](https://github.com/home-assistant/builder/compare/2025.09.0...2025.11.0)

---
updated-dependencies:
- dependency-name: home-assistant/builder
  dependency-version: 2025.11.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-12-01 20:32:52 +00:00
7 changed files with 41 additions and 19 deletions

View File

@@ -173,7 +173,7 @@ jobs:
- name: Build ${{ matrix.addon }} add-on
id: builderstep
if: steps.check.outputs.build_arch == 'true' && steps.dockerfile_check.outputs.has_dockerfile == 'true'
uses: home-assistant/builder@2025.09.0
uses: home-assistant/builder@2025.11.0
env:
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
with:

View File

@@ -37,6 +37,14 @@ This addon is based on the docker image https://hub.docker.com/r/charlocharlie/e
Addon options expose the `env_vars` field for passing extra environment variables; all other configuration is done via the JSON file.
### Add-on Options
| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `run_on_startup` | boolean | `true` | Run a claim cycle when the add-on starts |
| `disable_cron` | boolean | `false` | Disable the cron schedule (only run on startup) |
| `env_vars` | list | `[]` | Extra environment variables to pass to the container |
### Configuration Files
Configuration files are stored in `/config/addons_config/epicgamesfree/`:

View File

@@ -75,6 +75,8 @@ map:
name: Epic Games Free
options:
env_vars: []
run_on_startup: true
disable_cron: false
ports:
3000/tcp: 3000
ports_description:
@@ -83,6 +85,8 @@ schema:
env_vars:
- name: match(^[A-Za-z0-9_]+$)
value: str?
run_on_startup: bool?
disable_cron: bool?
slug: epicgamesfree
udev: true
url: https://github.com/alexbelgium/hassio-addons

View File

@@ -28,6 +28,25 @@ fi
# Permissions
chmod -R 777 "$HOME"
######################
# APPLY ADDON CONFIG #
######################
# Handle run_on_startup option
if bashio::config.true "run_on_startup"; then
bashio::log.info "run_on_startup is enabled"
jq '.runOnStartup = true' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
else
bashio::log.info "run_on_startup is disabled"
jq '.runOnStartup = false' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
fi
# Handle disable_cron option
if bashio::config.true "disable_cron"; then
bashio::log.info "Cron schedule is disabled - the addon will only run on startup"
jq 'del(.cronSchedule)' "$CONFIG_JSON" > "${CONFIG_JSON}.tmp" && mv "${CONFIG_JSON}.tmp" "$CONFIG_JSON"
fi
##############
# Launch App #
##############

View File

@@ -46,4 +46,4 @@ slug: netalertx
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: 25.5.24
version: 25.10.1

View File

@@ -12,22 +12,13 @@ bashio::log.info "Update structure"
echo "Creating symlinks"
for folder in config db; do
echo "Creating for $folder"
target="/config/${folder}"
mkdir -p "$target"
# Migrate existing data from previous locations while avoiding self-copies
for legacy_path in "/app/${folder}" "/data/${folder}"; do
if [ -d "$legacy_path" ]; then
legacy_target="$(readlink -f "$legacy_path" || true)"
if [ "$legacy_target" != "$target" ] && [ "$(ls -A "$legacy_path")" ]; then
# -n prevents clobbering anything already present in /config
cp -rn "$legacy_path"/. "$target"/
fi
fi
done
rm -rf /data/"$folder"
ln -sf "$target" /data/"$folder"
# Create symlinks
mkdir -p /config/"$folder"
if [ -d /app/"$folder" ] && [ "$(ls -A /app/"$folder")" ]; then
cp -rn /app/"$folder"/* /config/"$folder"/
fi
rm -r /app/"$folder"
ln -sf /config/"$folder" /app/"$folder"
done
sudo chown -R nginx:www-data /config/db/

View File

@@ -47,4 +47,4 @@ slug: netalertx_fa
tmpfs: true
udev: true
url: https://github.com/alexbelgium/hassio-addons
version: 25.5.24
version: 25.10.1