From 540cc4377605e94dfebf0368fc918c55b5c4b144 Mon Sep 17 00:00:00 2001 From: Alexandre Date: Tue, 2 Nov 2021 10:35:14 +0100 Subject: [PATCH] allow mount by label --- bazarr/CHANGELOG.md | 1 + bazarr/README.md | 2 +- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- cloudcommander/CHANGELOG.md | 1 + cloudcommander/README.md | 14 +- cloudcommander/rootfs/92-local_mounts.sh | 19 ++- code-server/CHANGELOG.md | 11 ++ .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- emby/CHANGELOG.md | 1 + emby/root/etc/cont-init.d/92-local_mounts.sh | 19 ++- filebrowser/CHANGELOG.md | 1 + filebrowser/README.md | 2 +- filebrowser/rootfs/92-local_mounts.sh | 19 ++- grav/Readme.md | 2 +- jackett/CHANGELOG.md | 137 +++++++++++++++++- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- lidarr/CHANGELOG.md | 1 + lidarr/Readme.md | 2 +- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- papermerge/README.md | 2 +- photoprism/CHANGELOG.md | 1 + photoprism/README.md | 22 +-- photoprism/rootfs/92-local_mounts.sh | 19 ++- piwigo/CHANGELOG.md | 4 +- piwigo/README.md | 2 +- .../rootfs/etc/cont-init.d/92-local_mounts.sh | 19 ++- plex/CHANGELOG.md | 2 + plex/root/etc/cont-init.d/92-local_mounts.sh | 19 ++- prowlarr/README.md | 2 +- qbittorrent/CHANGELOG.md | 2 + qbittorrent/README.md | 2 +- .../rootfs/etc/cont-init.d/92-local_mounts.sh | 19 ++- radarr/CHANGELOG.md | 1 + radarr/README.md | 2 +- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- readarr/CHANGELOG.md | 3 + readarr/Readme.md | 2 +- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- sonarr/CHANGELOG.md | 2 + sonarr/README.md | 2 +- .../root/etc/cont-init.d/92-local_mounts.sh | 19 ++- transmission/README.md | 14 +- .../rootfs/etc/cont-init.d/92-local_mounts.sh | 19 ++- zzz_templates/92-local_mounts.sh | 19 ++- 44 files changed, 427 insertions(+), 117 deletions(-) diff --git a/bazarr/CHANGELOG.md b/bazarr/CHANGELOG.md index 127f77492..16ae5a584 100644 --- a/bazarr/CHANGELOG.md +++ b/bazarr/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename ## 1.0.0 (13-10-2021) diff --git a/bazarr/README.md b/bazarr/README.md index 9cfb8963d..37d7765ed 100644 --- a/bazarr/README.md +++ b/bazarr/README.md @@ -27,7 +27,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1, sdb1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/bazarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/bazarr/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/cloudcommander/CHANGELOG.md b/cloudcommander/CHANGELOG.md index 3fc27f26d..41d849cab 100644 --- a/cloudcommander/CHANGELOG.md +++ b/cloudcommander/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Allow uploads >16mb - Allow mounting local drives in protected mode - Allow mounting of devices up to sdg2 diff --git a/cloudcommander/README.md b/cloudcommander/README.md index 0bfaf6603..c9a08bda1 100644 --- a/cloudcommander/README.md +++ b/cloudcommander/README.md @@ -17,13 +17,13 @@ This addon is based on the [docker image](https://hub.docker.com/r/coderaiser/cl Webui can be found at `:8000`. ```yaml -"localdisks": "sda1" # Optional, requires priviledged mode -"networkdisks": "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas -"cifsusername": "username" # optional, smb username, same for all smb shares -"cifspassword": "password" # optional, smb password -"smbv1": "bool?" # smb v1 -"DROPBOX_TOKEN": "str?" # see https://cloudcmd.io/ -"CUSTOM_OPTIONS": "--name Homeassistant" # custom options from https://cloudcmd.io/ +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... +networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas +cifsusername: "username" # optional, smb username, same for all smb shares +cifspassword: "password" # optional, smb password +smbv1: "bool?" # smb v1 +DROPBOX_TOKEN: "str?" # see https://cloudcmd.io/ +CUSTOM_OPTIONS: "--name Homeassistant" # custom options from https://cloudcmd.io/ ``` ## Installation diff --git a/cloudcommander/rootfs/92-local_mounts.sh b/cloudcommander/rootfs/92-local_mounts.sh index d9dea1eeb..0920d68bd 100644 --- a/cloudcommander/rootfs/92-local_mounts.sh +++ b/cloudcommander/rootfs/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/code-server/CHANGELOG.md b/code-server/CHANGELOG.md index 08aee4182..a2a2bec9e 100644 --- a/code-server/CHANGELOG.md +++ b/code-server/CHANGELOG.md @@ -1,32 +1,43 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Allow mounting of devices up to sdg2 ## 3.12.0 (16-09-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.11.1 (12-08-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.11.0 (16-07-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.10.2 (22-05-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.10.1 (18-05-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.10.0 (12-05-2021) + - Update to latest version from linuxserver/docker-code-server ## 3.9.3 + - Update to latest version from linuxserver/docker-code-server ## 3.9.2 + - Update to latest version from linuxserver/docker-code-server ## 3.9.1 + - Update to latest version from linuxserver/docker-code-server ## 3.9.0 + - Update to latest version from linuxserver/docker-code-server - Enables PUID/GUID options 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 d9dea1eeb..0920d68bd 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 @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/emby/CHANGELOG.md b/emby/CHANGELOG.md index 362052ffb..3d3917a5b 100644 --- a/emby/CHANGELOG.md +++ b/emby/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename ## 4.7.0.15 (23-10-2021) 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 d9dea1eeb..0920d68bd 100644 --- a/emby/root/etc/cont-init.d/92-local_mounts.sh +++ b/emby/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/filebrowser/CHANGELOG.md b/filebrowser/CHANGELOG.md index 84931589f..18119d088 100644 --- a/filebrowser/CHANGELOG.md +++ b/filebrowser/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Allow mounting of devices up to sdg2 - Allow uploads >16mb - Allow local mount in protected mode diff --git a/filebrowser/README.md b/filebrowser/README.md index e0b1bc3d2..3ccf920d5 100644 --- a/filebrowser/README.md +++ b/filebrowser/README.md @@ -25,7 +25,7 @@ certfile: fullchain.pem #ssl certificate keyfile: privkey.pem #sslkeyfile NoAuth: true/false #Remove password. Resets database when changed. smbv1: false # Should smbv1 be used instead of 2.1+? -localdisks: sda1 #put the hardware name of your drive to mount separated by commas. Ex: sda1, sdb1... +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smbv2/3 servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password, same for all smb shares) diff --git a/filebrowser/rootfs/92-local_mounts.sh b/filebrowser/rootfs/92-local_mounts.sh index d9dea1eeb..0920d68bd 100644 --- a/filebrowser/rootfs/92-local_mounts.sh +++ b/filebrowser/rootfs/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/grav/Readme.md b/grav/Readme.md index e604984ac..ab0c4ca13 100644 --- a/grav/Readme.md +++ b/grav/Readme.md @@ -46,7 +46,7 @@ You can place the user folder from the theme/skeleton in /share/grav/www/user, GUID: user GPID: user TZ: timezone -localdisks: "sda1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password diff --git a/jackett/CHANGELOG.md b/jackett/CHANGELOG.md index f5d5a226d..4ba0aa6c8 100644 --- a/jackett/CHANGELOG.md +++ b/jackett/CHANGELOG.md @@ -1,402 +1,537 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example + +# 0.19.108 (31-10-2021) -## 0.19.108 (31-10-2021) - Update to latest version from linuxserver/docker-jackett ## 0.19.96 (30-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.19.84 (29-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.19.71 (28-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.19.62 (26-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.19.34 (23-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.19.16 (23-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.1041 (21-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.1022 (19-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.995 (15-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.992 (14-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.984 (13-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.929 (11-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.911 (09-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.908 (08-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.901 (06-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.899 (05-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.896 (04-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.891 (03-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.887 (02-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.875 (02-10-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.845 (29-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.815 (28-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.812 (26-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.795 (25-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.791 (24-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.789 (22-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.788 (22-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.786 (21-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.773 (17-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.767 (16-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.761 (15-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.746 (13-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.737 (12-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.729 (11-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.724 (10-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.713 (09-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.709 (08-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.666 (06-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.652 (04-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.648 (03-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.641 (02-09-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.632 (31-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.623 (29-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.616 (28-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.613 (28-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.606 (26-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.590 (24-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.578 (21-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.551 (19-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.545 (17-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.541 (14-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.537 (11-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.532 (10-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.531 (09-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.527 (07-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.525 (07-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.523 (05-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.518 (03-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.515 (02-08-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.505 (30-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.502 (29-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.496 (29-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.475 (25-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.463 (24-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.459 (23-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.457 (22-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.455 (21-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.444 (18-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.441 (17-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.432 (16-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.424 (14-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.413 (12-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.410 (11-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.407 (09-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.403 (07-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.402 (05-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.394 (05-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.390 (03-07-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.386 (30-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.385 (30-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.383 (29-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.379 (24-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.376 (24-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.372 (22-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.367 (22-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.364 (20-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.359 (19-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.345 (17-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.329 (16-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.317 (15-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.303 (14-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.290 (13-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.283 (10-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.273 (10-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.263 (09-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.259 (08-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.255 (07-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.234 (06-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.231 (05-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.225 (03-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.210 (02-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.205 (01-06-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.196 (30-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.181 (30-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.171 (28-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.169 (28-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.155 (27-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.145 (25-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.106 (24-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.100 (23-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.98 (21-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.96 (20-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.95 (19-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.88 (18-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.74 (17-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.67 (16-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.59 (15-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.31 (13-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.22 (12-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.15 (11-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.18.7 (10-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.1036 (08-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.1027 (06-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.1011 (06-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.1008 (05-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.996 (04-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.972 (03-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.966 (02-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.963 (01-05-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.960 (30-04-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.954 (29-04-2021) + - Update to latest version from linuxserver/docker-jackett ## 0.17.952 (27-04-2021) + - Update to latest version from linuxserver/docker-jackett + ## 3.0.2.4552 - Update to latest version from linuxserver/docker-jackett 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 d9dea1eeb..0920d68bd 100644 --- a/jackett/root/etc/cont-init.d/92-local_mounts.sh +++ b/jackett/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/lidarr/CHANGELOG.md b/lidarr/CHANGELOG.md index 6af05428a..c9ac238b9 100644 --- a/lidarr/CHANGELOG.md +++ b/lidarr/CHANGELOG.md @@ -1,2 +1,3 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Initial release - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename diff --git a/lidarr/Readme.md b/lidarr/Readme.md index a3e56fca1..245fbccf7 100644 --- a/lidarr/Readme.md +++ b/lidarr/Readme.md @@ -42,7 +42,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/lidarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/lidarr/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/papermerge/README.md b/papermerge/README.md index e0e931cb0..b02371412 100644 --- a/papermerge/README.md +++ b/papermerge/README.md @@ -34,7 +34,7 @@ Webui can be found at `:8000`. GUID: user GPID: user ocrlang: Any language can be set from this page (always three letters) [here](https://tesseract-ocr.github.io/tessdoc/Data-Files#data-files-for-version-400-november-29-2016). -localdisks: "sda1" # list of device to mount (optional) +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "" # list of smbv2/3 servers to mount (optional) cifsusername: "username" # smb username (optional) cifspassword: "password" # smb password (optional) diff --git a/photoprism/CHANGELOG.md b/photoprism/CHANGELOG.md index cb771a111..5bedd9f1d 100644 --- a/photoprism/CHANGELOG.md +++ b/photoprism/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Allow mounting of devices up to sdg2 - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename diff --git a/photoprism/README.md b/photoprism/README.md index f6da9ec32..7e0baa8ed 100644 --- a/photoprism/README.md +++ b/photoprism/README.md @@ -34,17 +34,17 @@ comparison to installing any other Hass.io add-on. Webui can be found at ```yaml -"localdisks": "sda1" # Optional, requires priviledged mode -"networkdisks": "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas -"cifsusername": "username" # optional, smb username, same for all smb shares -"cifspassword": "password" # optional, smb password -"cifsdomain": "domain" # optional, allow setting the domain for the smb share -"UPLOAD_NSFW": "true" allow uploads that may be offensive -"STORAGE_PATH": "/share/photoprism/storage" # storage PATH for cache, database and sidecar files -"ORIGINALS_PATH": "/share/photoprism/originals" # originals PATH containing your photo and video collection -"IMPORT_PATH": "/share/photoprism/import" # PATH for importing files to originals -"BACKUP_PATH": "/share/photoprism/backup" # backup storage PATH -"CUSTOM_OPTIONS": "--site-title HA_Photoprism" # custom options from https://docs.photoprism.org/getting-started/config-options/ +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... +networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas +cifsusername: "username" # optional, smb username, same for all smb shares +cifspassword: "password" # optional, smb password +cifsdomain: "domain" # optional, allow setting the domain for the smb share +UPLOAD_NSFW: "true" allow uploads that may be offensive +STORAGE_PATH: "/share/photoprism/storage" # storage PATH for cache, database and sidecar files +ORIGINALS_PATH: "/share/photoprism/originals" # originals PATH containing your photo and video collection +IMPORT_PATH: "/share/photoprism/import" # PATH for importing files to originals +BACKUP_PATH: "/share/photoprism/backup" # backup storage PATH +CUSTOM_OPTIONS: "--site-title HA_Photoprism" # custom options from https://docs.photoprism.org/getting-started/config-options/ ``` ## Illustration diff --git a/photoprism/rootfs/92-local_mounts.sh b/photoprism/rootfs/92-local_mounts.sh index d9dea1eeb..0920d68bd 100644 --- a/photoprism/rootfs/92-local_mounts.sh +++ b/photoprism/rootfs/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/piwigo/CHANGELOG.md b/piwigo/CHANGELOG.md index e3e6f44e4..39a825974 100644 --- a/piwigo/CHANGELOG.md +++ b/piwigo/CHANGELOG.md @@ -1,8 +1,10 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Allow mounting of devices up to sdg2 ## 11.5.0 (15-05-2021) + - Update to latest version from linuxserver/docker-piwigo ## 11.4.0 -- Update to latest version from linuxserver/docker-piwigo +- Update to latest version from linuxserver/docker-piwigo diff --git a/piwigo/README.md b/piwigo/README.md index fd5a6a7b0..1d3990575 100644 --- a/piwigo/README.md +++ b/piwigo/README.md @@ -37,7 +37,7 @@ Webui can be found at . ```yaml GUID: user GPID: user -localdisks: "sda1" # list of device to mount (optional) +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "" # list of smbv2/3 servers to mount (optional) cifsusername: "username" # smb username (optional) cifspassword: "password" # smb password (optional) 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 d9dea1eeb..0920d68bd 100644 --- a/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh +++ b/piwigo/rootfs/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/plex/CHANGELOG.md b/plex/CHANGELOG.md index 0a0e8f3f5..145b877f2 100644 --- a/plex/CHANGELOG.md +++ b/plex/CHANGELOG.md @@ -1,5 +1,7 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example ## 1.24.5.5173-8dcc73a59-ls83 (28-10-2021) + - Update to latest version from linuxserver/docker-plex - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename 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 d9dea1eeb..0920d68bd 100644 --- a/plex/root/etc/cont-init.d/92-local_mounts.sh +++ b/plex/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/prowlarr/README.md b/prowlarr/README.md index 79859c143..946d23f51 100644 --- a/prowlarr/README.md +++ b/prowlarr/README.md @@ -42,7 +42,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1, sdb1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password diff --git a/qbittorrent/CHANGELOG.md b/qbittorrent/CHANGELOG.md index 17e3bcc29..12a8d0cac 100644 --- a/qbittorrent/CHANGELOG.md +++ b/qbittorrent/CHANGELOG.md @@ -1,5 +1,7 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example ## 14.3.9.99202110311443-7435-01519b5e7ubuntu20.04.1-ls159 (31-10-2021) + - Update to latest version from linuxserver/docker-qbittorrent - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename diff --git a/qbittorrent/README.md b/qbittorrent/README.md index 829230964..2f43c7076 100644 --- a/qbittorrent/README.md +++ b/qbittorrent/README.md @@ -60,7 +60,7 @@ Username: "admin" #username to access webui. Please change it as the default is customUI: selection from list # alternative webUI can be set here. Latest version set at each addon start. DNS_servers : 8.8.8.8,1.1.1.1 # Keep blank to use router’s DNS, or set custom DNS to avoid spamming in case of local DNS ad-remover SavePath: "/share/qbittorrent" # Define the download directory -localdisks: "sda1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/radarr/CHANGELOG.md b/radarr/CHANGELOG.md index 0385d8280..a7a3d6190 100644 --- a/radarr/CHANGELOG.md +++ b/radarr/CHANGELOG.md @@ -1,3 +1,4 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename - Breaking changes : multiple network disks must be separated by a "," and they are mounted to a folder with the name of the external share. diff --git a/radarr/README.md b/radarr/README.md index 4eae5ffc5..6f0a68be2 100644 --- a/radarr/README.md +++ b/radarr/README.md @@ -42,7 +42,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1, sdb1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/radarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/radarr/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/readarr/CHANGELOG.md b/readarr/CHANGELOG.md index d19b9f68f..5d8bad736 100644 --- a/readarr/CHANGELOG.md +++ b/readarr/CHANGELOG.md @@ -1,8 +1,11 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example ## nightly-0.1.0.1003-ls22 (28-10-2021) + - Update to latest version from linuxserver/docker-readarr ## nightly-0.1.0.998-ls20 (23-10-2021) + - Update to latest version from linuxserver/docker-readarr - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename diff --git a/readarr/Readme.md b/readarr/Readme.md index 5c790daab..33a043011 100644 --- a/readarr/Readme.md +++ b/readarr/Readme.md @@ -42,7 +42,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/readarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/readarr/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/sonarr/CHANGELOG.md b/sonarr/CHANGELOG.md index 0885669b9..d29530e56 100644 --- a/sonarr/CHANGELOG.md +++ b/sonarr/CHANGELOG.md @@ -1,3 +1,5 @@ +- Allow mounting local drives by label. Just pust the label instead of sda1 for example +- Allow mounting local drives by label. Just pust the label instead of sda1 for example - Improve SMB mount code to v1.5 ; accepts several network disks separated by commas (//123.12.12.12/share,//123.12.12.12/hello) that are mount to /mnt/$sharename ## 3.0.6.1342 (02-10-2021) diff --git a/sonarr/README.md b/sonarr/README.md index bcdb7051b..c7e0a7aca 100644 --- a/sonarr/README.md +++ b/sonarr/README.md @@ -42,7 +42,7 @@ Configurations can be done through the app webUI, except for the following optio GUID: user GPID: user TZ: timezone -localdisks: "sda1, sdb1" # Optional +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... networkdisks: "//SERVER/SHARE" # optional, list of smb servers to mount, separated by commas cifsusername: "username" # optional, smb username, same for all smb shares cifspassword: "password" # optional, smb password 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 d9dea1eeb..0920d68bd 100644 --- a/sonarr/root/etc/cont-init.d/92-local_mounts.sh +++ b/sonarr/root/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/transmission/README.md b/transmission/README.md index df98793d9..072ca3e48 100644 --- a/transmission/README.md +++ b/transmission/README.md @@ -28,12 +28,14 @@ comparison to installing any other Hass.io add-on. Options : -- "download_dir": "/share/downloads" # where the files will be saved after download -- "incomplete_dir": "/share/incomplete" # where the files are saved during download -- "localdisks": ["sda1"] # list of devices to mount, '' if none -- "networkdisks": "" # list of smbv2/3 servers to mount, '' if none -- "cifsusername": "" # smb username -- "cifspassword": "" # smb password +```yaml +download_dir: "/share/downloads" # where the files will be saved after download +incomplete_dir: "/share/incomplete" # where the files are saved during download +localdisks: sda1 #put the hardware name of your drive to mount separated by commas, or its label. Ex: sda1, sdb1, MYNAS... +networkdisks: "" # list of smbv2/3 servers to mount, '' if none +cifsusername: "" # smb username +cifspassword: "" # smb password +``` Complete transmission options are in /share/transmission (make sure addon is stopped before modifying it as Transmission writes its ongoing values when stopping and could erase your changes) diff --git a/transmission/rootfs/etc/cont-init.d/92-local_mounts.sh b/transmission/rootfs/etc/cont-init.d/92-local_mounts.sh index d9dea1eeb..0920d68bd 100644 --- a/transmission/rootfs/etc/cont-init.d/92-local_mounts.sh +++ b/transmission/rootfs/etc/cont-init.d/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi diff --git a/zzz_templates/92-local_mounts.sh b/zzz_templates/92-local_mounts.sh index d9dea1eeb..0920d68bd 100644 --- a/zzz_templates/92-local_mounts.sh +++ b/zzz_templates/92-local_mounts.sh @@ -4,8 +4,6 @@ # MOUNT LOCAL SHARES # ###################### - - # Mount local Share if configured if bashio::config.has_value 'localdisks'; then @@ -14,10 +12,21 @@ if bashio::config.has_value 'localdisks'; then # Separate comma separated values for disk in ${MOREDISKS//,/ }; do - # Mount each disk + + # Mount by device as default + devpath=/dev + + # Mount as label + [ ${disk:0:2} != "sd" ] && devpath=/dev/disk/by-label + + # Creates dir 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.info "Success! $disk mounted to /mnt/$disk" || (bashio::log.fatal "Unable to mount local drives!" && rmdir /mnt/$disk) + # Legacy mounting : mount to share if still exists (avoid breaking changes) + [ -d /share/$disk ] && mount $devpath/$disk /share/$disk || true + # Mount + 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 + fi