From d90d07446ca361d4d41d0df0a1b95bfb4bf67503 Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:10:59 +0200 Subject: [PATCH 1/7] Update 50-mounts --- sonarr/root/etc/cont-init.d/50-mounts | 32 ++++++++++++++++++--------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/sonarr/root/etc/cont-init.d/50-mounts b/sonarr/root/etc/cont-init.d/50-mounts index e7fb49d35..722070593 100644 --- a/sonarr/root/etc/cont-init.d/50-mounts +++ b/sonarr/root/etc/cont-init.d/50-mounts @@ -25,19 +25,31 @@ if bashio::config.has_value 'networkdisks'; then MOREDISKS=$(bashio::config 'networkdisks') CIFS_USERNAME=$(bashio::config 'cifsusername') CIFS_PASSWORD=$(bashio::config 'cifspassword') + ITERATOR=0 bashio::log.info "Network Disks mounting.. ${MOREDISKS}" && \ - for disk in $MOREDISKS + for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - mkdir -p /share/storagecifs && \ - if [ ! -d /storage/storagecifs ]; then - echo "Creating /storage/storagecifs" - mkdir -p /storage/storagecifs - chown -R abc:abc /storage/storagecifs - fi - - mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \ - bashio::log.info "Success!" + if [ $ITERATOR eq 0 ]; then + mkdir -p /share/storagecifs && \ + if [ ! -d /storage/storagecifs ]; then + echo "Creating /storage/storagecifs" + mkdir -p /storage/storagecifs + chown -R abc:abc /storage/storagecifs + fi + mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs && \ + bashio::log.info "Success!" + else + mkdir -p /share/storagecifs$ITERATOR && \ + if [ ! -d /storage/storagecifs$ITERATOR ]; then + echo "Creating /storage/storagecifs$ITERATOR" + mkdir -p /storage/storagecifs$ITERATOR + chown -R abc:abc /storage/storagecifs$ITERATOR + fi + mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /storage/storagecifs$ITERATOR && \ + bashio::log.info "Success!" + fi + ITERATOR=$((ITERATOR+1)) done || \ bashio::log.warning "Protection mode is ON. Unable to mount external drives!" fi From b5a4afb9f1b1fb35eb5b9dbb544a017ef3d4be26 Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:14:56 +0200 Subject: [PATCH 2/7] Update config.json --- sonarr/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonarr/config.json b/sonarr/config.json index f114dcc46..722b07dfc 100644 --- a/sonarr/config.json +++ b/sonarr/config.json @@ -26,7 +26,7 @@ "PUID": 0, "PGID": 0, "localdisks": ["sda1"], - "networkdisks": "", + "networkdisks": " ", "cifsusername": "", "cifspassword": "" }, From 1d987e36e1cba08aeb087506350487917ada3680 Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:23:10 +0200 Subject: [PATCH 3/7] Update 50-mounts --- sonarr/root/etc/cont-init.d/50-mounts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonarr/root/etc/cont-init.d/50-mounts b/sonarr/root/etc/cont-init.d/50-mounts index 722070593..e6aa74db8 100644 --- a/sonarr/root/etc/cont-init.d/50-mounts +++ b/sonarr/root/etc/cont-init.d/50-mounts @@ -30,7 +30,7 @@ if bashio::config.has_value 'networkdisks'; then for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - if [ $ITERATOR eq 0 ]; then + if [ $ITERATOR -eq 0 ]; then mkdir -p /share/storagecifs && \ if [ ! -d /storage/storagecifs ]; then echo "Creating /storage/storagecifs" From 4dd45ce7ef4d1c2536ad92a943b8f39bd2220cdb Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:27:30 +0200 Subject: [PATCH 4/7] Update 50-mounts --- sonarr/root/etc/cont-init.d/50-mounts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sonarr/root/etc/cont-init.d/50-mounts b/sonarr/root/etc/cont-init.d/50-mounts index e6aa74db8..03359ed32 100644 --- a/sonarr/root/etc/cont-init.d/50-mounts +++ b/sonarr/root/etc/cont-init.d/50-mounts @@ -30,7 +30,7 @@ if bashio::config.has_value 'networkdisks'; then for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - if [ $ITERATOR -eq 0 ]; then + if [ "$ITERATOR" -eq "0" ]; then mkdir -p /share/storagecifs && \ if [ ! -d /storage/storagecifs ]; then echo "Creating /storage/storagecifs" From 6bf8f98d274ec943e5bee11d6886d1cc89010458 Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:29:51 +0200 Subject: [PATCH 5/7] Update repository.json --- repository.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository.json b/repository.json index deaf01991..b6a1cdfb2 100644 --- a/repository.json +++ b/repository.json @@ -1,5 +1,5 @@ { - "name": "Hass.io Add-ons by alexbelgium", + "name": "Hass.io Add-ons by alexbelgium2", "url": "https://github.com/alexbelgium/hassio-addons", "maintainer": "alexbelgium" } From 0287a10aee3ea1324b4bc54e880046b0bbac73d0 Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:32:09 +0200 Subject: [PATCH 6/7] Update 50-mounts --- sonarr/root/etc/cont-init.d/50-mounts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sonarr/root/etc/cont-init.d/50-mounts b/sonarr/root/etc/cont-init.d/50-mounts index 03359ed32..a8fbbaa77 100644 --- a/sonarr/root/etc/cont-init.d/50-mounts +++ b/sonarr/root/etc/cont-init.d/50-mounts @@ -25,12 +25,12 @@ if bashio::config.has_value 'networkdisks'; then MOREDISKS=$(bashio::config 'networkdisks') CIFS_USERNAME=$(bashio::config 'cifsusername') CIFS_PASSWORD=$(bashio::config 'cifspassword') - ITERATOR=0 + ITERATOR=1 bashio::log.info "Network Disks mounting.. ${MOREDISKS}" && \ for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - if [ "$ITERATOR" -eq "0" ]; then + if [ "$ITERATOR" -eq "1" ]; then mkdir -p /share/storagecifs && \ if [ ! -d /storage/storagecifs ]; then echo "Creating /storage/storagecifs" From 7b192c8c9829ed3902726fb8af70598616693eae Mon Sep 17 00:00:00 2001 From: elmerenges Date: Fri, 21 May 2021 16:34:26 +0200 Subject: [PATCH 7/7] Update repository.json --- repository.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repository.json b/repository.json index b6a1cdfb2..deaf01991 100644 --- a/repository.json +++ b/repository.json @@ -1,5 +1,5 @@ { - "name": "Hass.io Add-ons by alexbelgium2", + "name": "Hass.io Add-ons by alexbelgium", "url": "https://github.com/alexbelgium/hassio-addons", "maintainer": "alexbelgium" }