Commit Graph

126 Commits

Author SHA1 Message Date
copilot-swe-agent[bot]
43007282a4 Fix shebang probe rejecting valid interpreters when Supervisor API returns empty
The probe script requires bashio::addon.version to return non-empty output,
but the Supervisor API may not be ready during container init. This causes
all shebang candidates to be rejected even though the interpreter works fine.

Fix: output a 'PROBE_OK' marker when the script executes successfully but
the version is empty. Also check /.bashio-standalone.sh as fallback path
(some containers store it there instead of /usr/local/lib/).

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-03-07 18:55:28 +00:00
copilot-swe-agent[bot]
50a7f44ff3 Address code review: capture exit code explicitly in fallback error message
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-03-07 09:24:10 +00:00
copilot-swe-agent[bot]
7cfe9a8770 Fix E2BIG error in ha_entrypoint.sh: add source fallback when exec fails with rc=126
When the environment is too large for exec (E2BIG), scripts fail with
'env: can't execute bashio: Argument list too long'. This adds a fallback
that sources the script in a subshell with bashio preloaded, avoiding exec
entirely. Applied to both init scripts and service runners.

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-03-07 09:22:47 +00:00
copilot-swe-agent[bot]
2f9721e0d7 Fix standalone Docker Compose mode: fallback to bashio-standalone when no Supervisor
- ha_entrypoint.sh: probe_script_content now tries regular bashio first,
  falls back to bashio-standalone.sh if Supervisor API unreachable
- 00-banner.sh: source bashio-standalone before calling bashio functions
  in standalone branch (prevents undefined function errors with set -e)
- 01-custom_script.sh: same probe fix + add bashio-standalone.sh to
  fallback source chain

Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-02-25 16:43:19 +00:00
Alexandre
7134bd92d7 Reduce max restarts from 10 to 5 2026-02-23 13:59:40 +01:00
copilot-swe-agent[bot]
20c1b75d43 Fix infinite restart loop: break on clean exit, cap crashes at 10
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-02-23 12:55:42 +00:00
copilot-swe-agent[bot]
16d7fbcdf9 Fix service supervision and local variable scoping in ha_entrypoint.sh
Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com>
2026-02-22 19:57:19 +00:00
Alexandre
bbbeecd174 Fix shebang validation and error handling 2026-02-04 21:37:56 +01:00
Alexandre
06ec2f7710 Suppress intermediate messages 2026-02-04 20:23:37 +01:00
Alexandre
63e3473f59 Update ha_entrypoint.sh 2026-02-01 07:45:24 +01:00
Alexandre
4574b39652 Update ha_entrypoint.sh 2026-01-31 13:22:44 +01:00
Alexandre
47fc48a3a6 Run docker mods before starting services 2026-01-31 13:20:15 +01:00
Alexandre
a0c574524c Remove standalone mode handling in ha_entrypoint.sh
Removed standalone mode check for bashio commands.
2026-01-30 13:06:49 +01:00
Alexandre
3a9bfb4884 Update ha_entrypoint.sh 2026-01-30 09:09:05 +01:00
Alexandre
8ddf0df0ce Update ha_entrypoint.sh 2026-01-16 10:29:37 +01:00
Alexandre
633f6bf5c7 Avoid message 2025-11-19 20:42:45 +01:00
Alexandre
e4598f9ad6 Update ha_entrypoint.sh 2025-09-16 14:56:36 +02:00
Alexandre
cf6bc3ec12 Modify cleanup to echo message instead of removing script
Replace script removal with a message and exit.
2025-09-16 14:44:05 +02:00
Alexandre
1ed9026eba Refactor ha_entrypoint.sh to simplify script execution 2025-09-16 14:40:49 +02:00
Alexandre
03a0d2d8a3 Comment out sed command in ha_entrypoint.sh 2025-09-15 16:42:45 +02:00
Alexandre
3877326185 Refactor sed command for s6-envuidgid in entrypoint script 2025-09-15 16:29:38 +02:00
Alexandre
97880a0f0c Update ha_entrypoint.sh to modify s6 commands 2025-09-15 16:16:16 +02:00
Alexandre
51d09b62f1 Fix sed command for s6-setuidgid in ha_entrypoint.sh 2025-09-15 16:05:27 +02:00
Alexandre
16108522f5 Fix sed commands in ha_entrypoint.sh 2025-09-15 15:56:18 +02:00
Alexandre
b8e0348f0d Conditionally apply s6 mods based on PID1 2025-09-15 15:52:55 +02:00
Alexandre
5241603a3e Update entrypoint to exclude cont-init.d scripts 2025-09-15 15:51:23 +02:00
Alexandre
d4ce4160a8 feat: unify s6 modifications 2025-09-15 15:49:01 +02:00
Alexandre
7daef60f6f Include /etc/cont-init.d/* in run scripts 2025-09-15 13:53:24 +02:00
alexbelgium
0d3c7619b4 fix: auto-fix linting issues 2025-08-17 00:34:15 +00:00
Alexandre
1ff26c57e6 templates: replace s6-svwait 2025-08-15 19:19:05 +02:00
Alexandre
0ae38f2fa4 Direct update 2025-08-02 12:41:07 +02:00
Alexandre
9f0651671d Update ha_entrypoint.sh 2025-08-02 11:06:34 +02:00
Alexandre
9f61eb14d7 Test for bashio 2025-08-01 16:47:03 +02:00
Alexandre
e65f24e1d0 Update ha_entrypoint.sh 2025-08-01 16:45:01 +02:00
Alexandre
2d96d65ab9 Update ha_entrypoint.sh 2025-08-01 16:29:40 +02:00
Alexandre
ac2d872631 Update ha_entrypoint.sh 2025-08-01 16:22:27 +02:00
Alexandre
58affcde24 Update ha_entrypoint.sh 2025-08-01 16:17:09 +02:00
Alexandre
275a5f69c2 Update ha_entrypoint.sh 2025-08-01 16:06:43 +02:00
Alexandre
28de340781 Test with bashio 2025-08-01 15:29:28 +02:00
Alexandre
9d9ec543a4 Improve logic s6 2025-08-01 15:16:10 +02:00
Alexandre
66bc3428e5 Update ha_entrypoint.sh 2025-07-31 15:22:02 +02:00
Alexandre
3d2e73a5e7 Update ha_entrypoint.sh 2025-07-31 15:21:44 +02:00
Alexandre
997dd934d4 Revert code but start services 2025-07-31 15:13:55 +02:00
Alexandre
7098e64795 Refactor 2025-07-30 06:33:23 +02:00
Alexandre
dddf9adfa6 Use pid1 2025-07-30 06:25:30 +02:00
Alexandre
9416c80b14 Test shebangs 2025-07-30 06:23:58 +02:00
Alexandre
434c19641f My code 2025-07-29 22:57:02 +02:00
Alexandre
c957ed2afd Revert code 2025-07-29 22:32:06 +02:00
Alexandre
3f7c23542a Update ha_entrypoint.sh 2025-07-28 22:32:55 +02:00
Alexandre
41cb49a502 Refactor 2025-07-28 22:26:54 +02:00