From 04262f1d5d57b1e56f49d89360e17c405c0f7919 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Nov 2020 19:11:01 +0100 Subject: [PATCH 1/5] Delete mount --- emby/root/config/custom-cont-init.d/mount | 31 ----------------------- 1 file changed, 31 deletions(-) delete mode 100644 emby/root/config/custom-cont-init.d/mount diff --git a/emby/root/config/custom-cont-init.d/mount b/emby/root/config/custom-cont-init.d/mount deleted file mode 100644 index da5024074..000000000 --- a/emby/root/config/custom-cont-init.d/mount +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/with-contenv bashio -bashio::log.info 'Mounting external hdd...' - -# Mount local Share if configured and if Protection Mode is active -if bashio::config.has_value 'localdisks'; then - MOREDISKS=$(bashio::config 'localdisks') - bashio::log.info "Local Disks mounting.. ${MOREDISKS}" && \ - for disk in $MOREDISKS - do - bashio::log.info "Mount ${disk}" - mount $disk /share/storage && \ - bashio::log.info "Success!" - done || \ - bashio::log.warning "Protection mode is ON. Unable to mount local drives!" -fi - -# Mount CIFS Share if configured and if Protection Mode is active -if bashio::config.has_value 'networkdisks'; then - MOREDISKS=$(bashio::config 'networkdisks') - CIFS_USERNAME=$(bashio::config 'cifsusername') - CIFS_PASSWORD=$(bashio::config 'cifspassword') - bashio::log.info "Network Disks mounting.. ${MOREDISKS}" && \ - for disk in $MOREDISKS - do - bashio::log.info "Mount ${disk}" - mkdir -p /$disk && \ - mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /$disk && \ - bashio::log.info "Success!" - done || \ - bashio::log.warning "Protection mode is ON. Unable to mount external drives!" -fi From 974e5e5b758714f5af1f71ef80b65c11c6212580 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Nov 2020 19:12:44 +0100 Subject: [PATCH 2/5] Update 50-mounts --- emby/root/etc/cont-init.d/50-mounts | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/emby/root/etc/cont-init.d/50-mounts b/emby/root/etc/cont-init.d/50-mounts index d9a8a741a..75124f881 100644 --- a/emby/root/etc/cont-init.d/50-mounts +++ b/emby/root/etc/cont-init.d/50-mounts @@ -10,15 +10,14 @@ if bashio::config.has_value 'localdisks'; then for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - mkdir -p /$disk && \ - - if [ ! -d /share/storage ]; then - echo "Creating /share/storage" - mkdir -p /share/storage - chown -R abc:abc /share/storage + mkdir -p /share/$disk && \ + if [ ! -d /share/$disk ]; then + echo "Creating /share/$disk" + mkdir -p /share/$disk + chown -R abc:abc /share/$disk fi - mount $disk /share/storage && \ + mount $disk /share/$disk && \ bashio::log.info "Success!" done || \ bashio::log.warning "Protection mode is ON. Unable to mount local drives!" From 6bb1e8a778cb0d5e1e859e96abd00db44552deec Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Nov 2020 19:13:11 +0100 Subject: [PATCH 3/5] Update config.json --- emby/config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emby/config.json b/emby/config.json index 4d3c88cc1..4da3a7b64 100644 --- a/emby/config.json +++ b/emby/config.json @@ -1,6 +1,6 @@ { "name": "emby_nas", - "version": "1.6", + "version": "1.7", "slug": "emby_nas", "legacy": false, "maintenance": { From a4279860d52bc79bd4b0bbe528825a1caeb12468 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Nov 2020 19:16:40 +0100 Subject: [PATCH 4/5] Update config.json --- emby/config.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/emby/config.json b/emby/config.json index 4da3a7b64..2cdcab632 100644 --- a/emby/config.json +++ b/emby/config.json @@ -1,6 +1,6 @@ { "name": "emby_nas", - "version": "1.7", + "version": "1.8", "slug": "emby_nas", "legacy": false, "maintenance": { @@ -36,8 +36,8 @@ "options": { "PUID": 1001, "PGID": 1001, - "localdisks": ["/dev/sdb1"], - "networkdisks": [""], + "localdisks": "/dev/sdb1", + "networkdisks": "", "cifsusername": "", "cifspassword": "" }, @@ -45,8 +45,8 @@ "PUID": "int", "PGID": "int", "TZ": "str?", - "localdisks": ["str"], - "networkdisks": ["str"], + "localdisks": "str", + "networkdisks": "str", "cifsusername": "str", "cifspassword": "str" } From 2b62941e5cf51e8bd2b24895743b7b9f9e97a149 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sun, 29 Nov 2020 19:18:26 +0100 Subject: [PATCH 5/5] Update 50-mounts --- emby/root/etc/cont-init.d/50-mounts | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/emby/root/etc/cont-init.d/50-mounts b/emby/root/etc/cont-init.d/50-mounts index 75124f881..ab6c54ec2 100644 --- a/emby/root/etc/cont-init.d/50-mounts +++ b/emby/root/etc/cont-init.d/50-mounts @@ -10,14 +10,14 @@ if bashio::config.has_value 'localdisks'; then for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - mkdir -p /share/$disk && \ - if [ ! -d /share/$disk ]; then - echo "Creating /share/$disk" - mkdir -p /share/$disk - chown -R abc:abc /share/$disk + mkdir -p /share/storage && \ + if [ ! -d /share/storage ]; then + echo "Creating /share/storage" + mkdir -p /share/storage + chown -R abc:abc /share/storage fi - mount $disk /share/$disk && \ + mount $disk /share/storage && \ bashio::log.info "Success!" done || \ bashio::log.warning "Protection mode is ON. Unable to mount local drives!" @@ -32,8 +32,14 @@ if bashio::config.has_value 'networkdisks'; then for disk in $MOREDISKS do bashio::log.info "Mount ${disk}" - mkdir -p /$disk && \ - mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /$disk && \ + mkdir -p /share/storagecifs && \ + if [ ! -d /share/storagecifs ]; then + echo "Creating /share/storagecifs" + mkdir -p /share/storagecifs + chown -R abc:abc /share/storagecifs + fi + + mount -t cifs -o username=$CIFS_USERNAME,password=$CIFS_PASSWORD $disk /share/storagecifs && \ bashio::log.info "Success!" done || \ bashio::log.warning "Protection mode is ON. Unable to mount external drives!"