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] 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!"