From 331f5403ae816e7307c964cbc2f9ac6915127f8c Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 23 Oct 2021 07:31:23 +0200 Subject: [PATCH] Update 92-smb_mounts_v1.4.sh --- qbittorrent/rootfs/etc/cont-init.d/92-smb_mounts_v1.4.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 1e03464d1..b2f1eb34e 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 @@ -55,14 +55,16 @@ if bashio::config.has_value 'networkdisks'; then fi # Messages - if [ $MOUNTED = true ]; then - mountpoint -q /mnt/$diskname && bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $SMBVERS$SECVERS" || bashio::log.fatal "Something went wrong with the disk mount!" + if [ $MOUNTED = true && mountpoint -q /mnt/$diskname ]; then + bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $SMBVERS$SECVERS" #Test write permissions touch /mnt/$diskname/testaze && rm /mnt/$diskname/testaze && bashio::log.info "... $disk successfully mounted to /mnt/$diskname with options $SMBVERS$SECVERS" || bashio::log.fatal "Disk is mounted, however unable to write in the shared disk. Please check UID/GID for permissions, and if the share is rw" else # message if still fail bashio::log.fatal "Unable to mount $disk to /mnt/$diskname with username $CIFS_USERNAME, $CIFS_PASSWORD. Please check your remote share path, username, password, domain, try putting 0 in UID and GID" # Mount share - bashio::log.fatal "Error read : $(/dev/null || true # Remove folder + rm /mnt/$diskname # Remove folder rm ERRORCODE fi