From 7aa408ec77a4b0093507a8d3a102dc8c280b41f8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 6 Mar 2026 17:37:03 +0000 Subject: [PATCH] Fix CloudCommander startup error: guard /homeassistant/addons_config with existence checks The script failed with 'find: /homeassistant/addons_config: No such file or directory' because it accessed the directory without checking if it exists. Since the script uses set -e, the failing find command caused the entire init script to exit. This follows the same pattern already used in the filebrowser addon's 20-folders.sh. Co-authored-by: alexbelgium <44178713+alexbelgium@users.noreply.github.com> --- cloudcommander/rootfs/etc/cont-init.d/99-run.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/cloudcommander/rootfs/etc/cont-init.d/99-run.sh b/cloudcommander/rootfs/etc/cont-init.d/99-run.sh index a91ae2b0b..1369c8394 100755 --- a/cloudcommander/rootfs/etc/cont-init.d/99-run.sh +++ b/cloudcommander/rootfs/etc/cont-init.d/99-run.sh @@ -18,7 +18,9 @@ fi # Clean symlinks find /config -maxdepth 1 -type l -delete -find /homeassistant/addons_config -maxdepth 1 -type l -delete +if [ -d /homeassistant/addons_config ]; then + find /homeassistant/addons_config -maxdepth 1 -type l -delete +fi # Remove erroneous folders if [ -d /homeassistant ]; then @@ -30,10 +32,14 @@ if [ -d /homeassistant ]; then fi fi -# Create symlinks -ln -s /homeassistant/addons_config /config -ln -s /homeassistant/addons_autoscripts /config -find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*cloudcommander*" -exec ln -s {} /config/addons_config/ \; +# Create symlinks with legacy folders +if [ -d /homeassistant/addons_config ]; then + ln -s /homeassistant/addons_config /config + find /addon_configs/ -maxdepth 1 -mindepth 1 -type d -not -name "*cloudcommander*" -exec ln -s {} /config/addons_config/ \; +fi +if [ -d /homeassistant/addons_autoscripts ]; then + ln -s /homeassistant/addons_autoscripts /config +fi ################# # NGINX SETTING #