Commit Graph
1 Commits
Author SHA1 Message Date
AbdoAhmedElbanaaandDivarion_D 060ded9698 fix(core,streaming): preserve execution permissions for core scripts and redis self-healing on boot
Port of Rosmi720/XC_VM@0d39e9bd. A mode-dropping deploy could leave core
scripts non-executable and a php-fpm pool config missing, and an undefined HOST
constant broke the unique-header cookie domain:

- StartupCommand restores the executable bit on service/update/redis-server/
  daemons.sh and regenerates any missing php-fpm pool config (1..4.conf) from
  the template on boot.
- StreamAuthMiddleware derives the cookie domain through a HOST-guarded helper,
  so an undefined/empty host or a bare IP yields no domain instead of throwing
  or emitting a broken "." domain.

Adapted to this tree: the added boot blocks were split into covered helpers
(ensureExecutableScripts / ensurePhpFpmPoolConfigs / uniqueHeaderDomain) with
unit tests to stay within the complexity ceiling, the sudo chown now runs only
as root, and comments were translated to English.
2026-09-21 19:44:23 +03:00