From 86991b283daa00eb1e49d0b50c9da0b955a85f05 Mon Sep 17 00:00:00 2001 From: Tobias <96661824+CrazyWolf13@users.noreply.github.com> Date: Sun, 5 Jul 2026 22:28:00 +0200 Subject: [PATCH] fix: homarr: cli (#15603) --- ct/homarr.sh | 5 +++++ install/homarr-install.sh | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ct/homarr.sh b/ct/homarr.sh index 82a27cfd6..620b147a9 100644 --- a/ct/homarr.sh +++ b/ct/homarr.sh @@ -35,6 +35,11 @@ function update_script() { systemctl stop redis-server msg_ok "Services Stopped" + if ! grep -q "source /opt/homarr.env" /usr/bin/homarr 2>/dev/null; then + echo $'#!/bin/bash\nset -a\nsource /opt/homarr.env\nset +a\ncd /opt/homarr/apps/cli && timeout 10 node ./cli.cjs "$@"' >/usr/bin/homarr + chmod +x /usr/bin/homarr + fi + if ! { grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr/.env 2>/dev/null || grep -q '^REDIS_IS_EXTERNAL=' /opt/homarr.env 2>/dev/null; }; then msg_info "Fixing old structure" systemctl disable -q --now nginx diff --git a/install/homarr-install.sh b/install/homarr-install.sh index 0a976b668..db89c2542 100644 --- a/install/homarr-install.sh +++ b/install/homarr-install.sh @@ -52,7 +52,7 @@ grep -q '^bind 127.0.0.1 -::1$' /etc/redis/redis.conf || echo "bind 127.0.0.1 -: rm -f /etc/nginx/nginx.conf mkdir -p /etc/nginx/templates cp /opt/homarr/nginx.conf /etc/nginx/templates/nginx.conf -echo $'#!/bin/bash\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr +echo $'#!/bin/bash\nset -a\nsource /opt/homarr.env\nset +a\ncd /opt/homarr/apps/cli && node ./cli.cjs "$@"' >/usr/bin/homarr chmod +x /usr/bin/homarr msg_ok "Copied config files"