diff --git a/signalk/CHANGELOG.md b/signalk/CHANGELOG.md index 179025ab0..abfb3e76c 100644 --- a/signalk/CHANGELOG.md +++ b/signalk/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2.22.1-1 (2026-02-25) +- Fix startup hang by handling node UID/GID remap failures gracefully in init script + ## 2.22.1 (2026-02-21) - Update to latest version from SignalK/signalk-server (changelog : https://github.com/SignalK/signalk-server/releases) diff --git a/signalk/config.yaml b/signalk/config.yaml index 0973e918b..73a90f077 100644 --- a/signalk/config.yaml +++ b/signalk/config.yaml @@ -57,5 +57,5 @@ uart: true udev: true url: https://github.com/alexbelgium/hassio-addons usb: true -version: "2.22.1" +version: "2.22.1-1" webui: http://[HOST]:[PORT:3000] diff --git a/signalk/rootfs/etc/cont-init.d/99-run.sh b/signalk/rootfs/etc/cont-init.d/99-run.sh index 06a886607..1611466d5 100755 --- a/signalk/rootfs/etc/cont-init.d/99-run.sh +++ b/signalk/rootfs/etc/cont-init.d/99-run.sh @@ -16,8 +16,24 @@ chown -R "$USER:$USER" /config # Set permissions echo "... setting permissions for node user" -usermod -o -u 0 node -groupmod -o -g 0 node +if id "$USER" &>/dev/null; then + current_uid="$(id -u "$USER")" + current_gid="$(id -g "$USER")" + + if [[ "$current_uid" != "0" ]]; then + if ! usermod -o -u 0 "$USER"; then + bashio::log.warning "Failed to set UID 0 for $USER; continuing with UID $current_uid" + fi + fi + + if [[ "$current_gid" != "0" ]]; then + if ! groupmod -o -g 0 "$USER"; then + bashio::log.warning "Failed to set GID 0 for $USER; continuing with GID $current_gid" + fi + fi +else + bashio::log.warning "User $USER does not exist; continuing without UID/GID remap" +fi # Ensure 600 for SSL files echo "... specifying security files permissions"