Update 92-local_mounts.sh

This commit is contained in:
Alexandre
2022-02-17 19:53:20 +01:00
committed by GitHub
parent cee63a19c4
commit 62cf6f2a84

View File

@@ -25,8 +25,10 @@ if bashio::config.has_value 'localdisks'; then
mkdir -p /mnt/"$disk"
chown -R "$(id -u)":"$(id -g)" /mnt/"$disk"
# Legacy mounting : mount to share if still exists (avoid breaking changes)
# shellcheck disable=SC2015
[ -d /share/"$disk" ] && mount "$devpath"/"$disk" /share/"$disk" || true
# Mount
# shellcheck disable=SC2015
mount "$devpath"/"$disk" /mnt/"$disk" && bashio::log.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives! Please check the name." && rmdir /mnt/$disk)
done