mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-04-07 06:27:01 +02:00
Fix SignalK startup hang on UID/GID remap failure
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user