diff --git a/.templates/92-local_mounts.sh b/.templates/92-local_mounts.sh index f6c4ee24f..3843a0ea6 100755 --- a/.templates/92-local_mounts.sh +++ b/.templates/92-local_mounts.sh @@ -28,7 +28,11 @@ if bashio::config.has_value 'localdisks'; then # Creates dir mkdir -p /mnt/"$disk" - chown "$PUID:$PGID" /mnt/"$disk" + if bashio::config.has_value 'PUID' && bashio::config.has_value 'PGID'; then + PUID="$(bashio::config 'PUID')" + PGID="$(bashio::config 'PUID')" + chown "$PUID:$PGID" /mnt/"$disk" + fi # Install lsblk if ! command -v "lsblk" &>/dev/null; then