From ca832d23dd023409b645bbb545e3d048c14f67a7 Mon Sep 17 00:00:00 2001 From: Alexandre Pary Date: Wed, 13 Oct 2021 11:33:31 +0200 Subject: [PATCH] Check if smb default Do not create error message if default SMB value not modified --- bazarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- cloudcommander/rootfs/run.sh | 8 ++++++-- .../root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- emby/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- jellyfin/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- .../{92-smb_mounts_v1.5.sh => 92-smb_mounts_v1.4.sh} | 0 papermerge/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- plex/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- radarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- .../{92-smb_mounts_v1.5.sh => 92-smb_mounts_v1.4.sh} | 0 sonarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- transmission/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- ubooquity/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 ++++++-- 15 files changed, 78 insertions(+), 26 deletions(-) rename lidarr/root/etc/cont-init.d/{92-smb_mounts_v1.5.sh => 92-smb_mounts_v1.4.sh} (100%) rename readarr/root/etc/cont-init.d/{92-smb_mounts_v1.5.sh => 92-smb_mounts_v1.4.sh} (100%) diff --git a/bazarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/bazarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/bazarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/bazarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/cloudcommander/rootfs/run.sh b/cloudcommander/rootfs/run.sh index d0f0cd370..1076affe4 100644 --- a/cloudcommander/rootfs/run.sh +++ b/cloudcommander/rootfs/run.sh @@ -68,8 +68,6 @@ fi || true # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -78,6 +76,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/doublecommander/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/doublecommander/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/doublecommander/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/doublecommander/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/emby/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/emby/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/emby/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/emby/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/jellyfin/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/jellyfin/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/jellyfin/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/jellyfin/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/lidarr/root/etc/cont-init.d/92-smb_mounts_v1.5.sh b/lidarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh similarity index 100% rename from lidarr/root/etc/cont-init.d/92-smb_mounts_v1.5.sh rename to lidarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh diff --git a/papermerge/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh b/papermerge/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/papermerge/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/papermerge/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/plex/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/plex/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/plex/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/plex/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/prowlarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh b/qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/radarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/radarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/radarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/radarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/readarr/root/etc/cont-init.d/92-smb_mounts_v1.5.sh b/readarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh similarity index 100% rename from readarr/root/etc/cont-init.d/92-smb_mounts_v1.5.sh rename to readarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh diff --git a/sonarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh b/sonarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/sonarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/sonarr/root/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/transmission/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh b/transmission/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/transmission/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/transmission/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')" diff --git a/ubooquity/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh b/ubooquity/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh index c9008b2be..a31ade114 100644 --- a/ubooquity/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh +++ b/ubooquity/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh @@ -4,8 +4,6 @@ # MOUNT SMB SHARES # #################### if bashio::config.has_value 'networkdisks'; then - # Mount CIFS Share if configured and if Protection Mode is active - bashio::log.info 'Mounting smb share(s)...' # Define variables MOREDISKS=$(bashio::config 'networkdisks') @@ -14,6 +12,12 @@ if bashio::config.has_value 'networkdisks'; then MOUNTED=false SMBVERS="" SECVERS="" + + # Dont execute if still default + [ ${MOREDISKS::1} == "<" ] && exit 0 + + # Mount CIFS Share if configured and if Protection Mode is active + bashio::log.info 'Mounting smb share(s)...' if bashio::config.has_value 'cifsdomain'; then DOMAIN=",domain=$(bashio::config 'cifsdomain')"