diff --git a/bazarr/root/etc/cont-init.d/92-local_mounts.sh b/bazarr/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/bazarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/bazarr/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/cloudcommander/rootfs/92-local_mounts.sh b/cloudcommander/rootfs/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/cloudcommander/rootfs/92-local_mounts.sh +++ b/cloudcommander/rootfs/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/code-server/root/etc/cont-init.d/92-local_mounts.sh b/code-server/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/code-server/root/etc/cont-init.d/92-local_mounts.sh +++ b/code-server/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/emby/root/etc/cont-init.d/92-local_mounts.sh b/emby/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/emby/root/etc/cont-init.d/92-local_mounts.sh +++ b/emby/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/filebrowser/rootfs/92-local_mounts.sh b/filebrowser/rootfs/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/filebrowser/rootfs/92-local_mounts.sh +++ b/filebrowser/rootfs/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/jackett/root/etc/cont-init.d/92-local_mounts.sh b/jackett/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/jackett/root/etc/cont-init.d/92-local_mounts.sh +++ b/jackett/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/lidarr/root/etc/cont-init.d/92-local_mounts.sh b/lidarr/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/lidarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/lidarr/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/photoprism/rootfs/92-local_mounts.sh b/photoprism/rootfs/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/photoprism/rootfs/92-local_mounts.sh +++ b/photoprism/rootfs/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh b/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh +++ b/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/plex/root/etc/cont-init.d/92-local_mounts.sh b/plex/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/plex/root/etc/cont-init.d/92-local_mounts.sh +++ b/plex/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh b/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh index 07c07658b..b03e82eb0 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="mnt" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/radarr/root/etc/cont-init.d/92-local_mounts.sh b/radarr/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/radarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/radarr/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/readarr/root/etc/cont-init.d/92-local_mounts.sh b/readarr/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/readarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/readarr/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi diff --git a/sonarr/root/etc/cont-init.d/92-local_mounts.sh b/sonarr/root/etc/cont-init.d/92-local_mounts.sh index b8f4e203a..b03e82eb0 100644 --- a/sonarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/sonarr/root/etc/cont-init.d/92-local_mounts.sh @@ -3,7 +3,6 @@ ###################### # MOUNT LOCAL SHARES # ###################### -MOUNTPOINTS="share" bashio::log.info 'Mounting external hdd...' @@ -16,9 +15,10 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do # Mount each disk - mkdir -p /$MOUNTPOINTS/$disk - chown -R $(id -u):$(id -g) /$MOUNTPOINTS/$disk - mount /dev/$disk /$MOUNTPOINTS/$disk - bashio::log.info "Success! $disk mounted to /$MOUNTPOINTS/$disk" + mkdir -p /mnt/$disk + chown -R $(id -u):$(id -g) /mnt/$disk + [ -d /share/$disk ] && mount /dev/$disk /share/$disk || true + mount /dev/$disk /mnt/$disk || (bashio::log.warning "Unable to mount local drives!" && rmdir /mnt/$disk) + bashio::log.info "Success! $disk mounted to /mnt/$disk" done -fi || (bashio::log.warning "Unable to mount local drives!" && rmdir /$MOUNTPOINTS/$disk) +fi