mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-09-14 05:39:09 +02:00
Compare commits
3 Commits
7e59aa8803
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e95820921d | ||
|
|
00f7b604fe | ||
|
|
fe4120bbdf |
@@ -60,11 +60,6 @@ if bashio::config.has_value 'localdisks'; then
|
||||
|
||||
# Creates dir
|
||||
mkdir -p /mnt/"$disk"
|
||||
if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID'; then
|
||||
PUID="$(bashio::config 'PUID')"
|
||||
PGID="$(bashio::config 'PGID')"
|
||||
chown "$PUID:$PGID" /mnt/"$disk"
|
||||
fi
|
||||
|
||||
# Check FS type and set relative options (thanks @https://github.com/dianlight/hassio-addons)
|
||||
fstype=$(lsblk "$devpath"/"$disk" -no fstype)
|
||||
@@ -101,12 +96,24 @@ if bashio::config.has_value 'localdisks'; then
|
||||
if [ -d /share/"$disk" ]; then dirpath="/share"; fi
|
||||
|
||||
# shellcheck disable=SC2015
|
||||
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to /mnt/$disk" \
|
||||
mount -t $type "$devpath"/"$disk" "$dirpath"/"$disk" -o $options && bashio::log.info "Success! $disk mounted to $dirpath/$disk" \
|
||||
|| (
|
||||
bashio::log.fatal "Unable to mount local drives! Please check the name."
|
||||
rmdir /mnt/"$disk"
|
||||
bashio::addon.stop
|
||||
)
|
||||
|
||||
# Check if the mount is accessible by the configured PUID/PGID
|
||||
# We do NOT chown/chmod the mount point as that would modify actual disk permissions
|
||||
if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID'; then
|
||||
PUID="$(bashio::config 'PUID')"
|
||||
mount_owner=$(stat -c '%u' "$dirpath/$disk" 2>/dev/null)
|
||||
mount_perms=$(stat -c '%a' "$dirpath/$disk" 2>/dev/null)
|
||||
if [ "$mount_owner" != "$PUID" ] && [ "${mount_perms:2:1}" = "0" ]; then
|
||||
bashio::log.warning "$dirpath/$disk is owned by UID $mount_owner with permissions $mount_perms - may not be accessible by PUID $PUID."
|
||||
bashio::log.warning "If the drive appears empty, fix permissions on the drive root: chmod 755 <mountpoint> (on the host)."
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
fi
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
## 10.11.9 (2026-05-22)
|
||||
- Update to latest version from linuxserver/docker-jellyfin (changelog : https://github.com/linuxserver/docker-jellyfin/releases)
|
||||
- Add warning when local drive mount permissions may prevent access by PUID/PGID
|
||||
|
||||
## 10.11.8 (2026-04-06)
|
||||
- Update to latest version from linuxserver/docker-jellyfin (changelog : https://github.com/linuxserver/docker-jellyfin/releases)
|
||||
|
||||
Reference in New Issue
Block a user