Update 92-smb_mounts.sh

This commit is contained in:
Alexandre
2022-10-10 21:19:19 +02:00
committed by GitHub
parent 2fe612a080
commit e17578a273

View File

@@ -63,7 +63,7 @@ if bashio::config.has_value 'networkdisks'; then
# Tries to mount with default options
# shellcheck disable=SC2140
mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE && MOUNTED=true || MOUNTED=false
mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE1 && MOUNTED=true || MOUNTED=false
# if Fail test different smb and sec versions
if [ "$MOUNTED" = false ]; then
@@ -112,8 +112,9 @@ if bashio::config.has_value 'networkdisks'; then
smbclient -L $disk -U "$CIFS_USERNAME%$CIFS_PASSWORD" || true
# Error code
bashio::log.fatal "Error read : $(<ERRORCODE)"
rm ERRORCODE
bashio::log.fatal "Error read : $(<ERRORCODE1)"
bashio::log.fatal "Additional read : $(<ERRORCODE)"
rm ERRORCODE*
# clean folder
umount "/mnt/$diskname" 2>/dev/null || true
@@ -122,6 +123,6 @@ if bashio::config.has_value 'networkdisks'; then
done
if [ -f ERRORCODE ]; then rm ERRORCODE; fi
if [ -f ERRORCODE ]; then rm ERRORCODE*; fi
fi