Fix cloudcommander startup path

This commit is contained in:
Alexandre
2026-02-04 20:33:06 +01:00
parent 9a77f6a7e4
commit afb8e2ef4a
3 changed files with 15 additions and 2 deletions

View File

@@ -1,4 +1,7 @@
## 19.3.2 (2026-02-04)
- Fix startup when cloudcmd.mjs is missing in upstream image
## 19.3.1 (2026-02-04)
- Update to latest version from coderaiser/cloudcmd (changelog : https://github.com/coderaiser/cloudcmd/releases)

View File

@@ -104,4 +104,4 @@ schema:
slug: cloudcommander
udev: true
url: https://github.com/alexbelgium/hassio-addons/tree/master/cloudcommander
version: "19.3.1"
version: "19.3.2"

View File

@@ -82,7 +82,17 @@ fi
bashio::log.info "Starting..."
cd /
./usr/src/app/bin/cloudcmd.mjs '"'"$DROPBOX_TOKEN""$CUSTOMOPTIONS"'"' &
if [ -f /usr/src/app/bin/cloudcmd.mjs ]; then
CLOUDCMD_BIN=/usr/src/app/bin/cloudcmd.mjs
elif [ -f /usr/src/app/bin/cloudcmd.js ]; then
CLOUDCMD_BIN=/usr/src/app/bin/cloudcmd.js
elif command -v cloudcmd >/dev/null 2>&1; then
CLOUDCMD_BIN=cloudcmd
else
bashio::log.error "Cloud Commander binary not found in /usr/src/app/bin or PATH."
exit 1
fi
"$CLOUDCMD_BIN" '"'"$DROPBOX_TOKEN""$CUSTOMOPTIONS"'"' &
bashio::net.wait_for 8000 localhost 900 || true
bashio::log.info "Started !"
exec nginx