mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-06 23:55:56 +02:00
Update 92-smb_mounts.sh
This commit is contained in:
@@ -63,7 +63,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
# Tries to mount with default options
|
# Tries to mount with default options
|
||||||
# shellcheck disable=SC2140
|
# shellcheck disable=SC2140
|
||||||
mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE1 && MOUNTED=true || MOUNTED=false
|
mount -t cifs -o rw,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}$DOMAIN$PUID$PGID" "$disk" /mnt/"$diskname" 2>ERRORCODE && MOUNTED=true || MOUNTED=false
|
||||||
|
|
||||||
# if Fail test different smb and sec versions
|
# if Fail test different smb and sec versions
|
||||||
if [ "$MOUNTED" = false ]; then
|
if [ "$MOUNTED" = false ]; then
|
||||||
@@ -114,7 +114,7 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
# Error code
|
# Error code
|
||||||
bashio::log.fatal "Error read : $(<ERRORCODE1)"
|
bashio::log.fatal "Error read : $(<ERRORCODE1)"
|
||||||
bashio::log.fatal "Additional read : $(<ERRORCODE)"
|
bashio::log.fatal "Additional read : $(<ERRORCODE)"
|
||||||
rm ERRORCODE*
|
rm ERRORCODE
|
||||||
|
|
||||||
# clean folder
|
# clean folder
|
||||||
umount "/mnt/$diskname" 2>/dev/null || true
|
umount "/mnt/$diskname" 2>/dev/null || true
|
||||||
@@ -123,6 +123,6 @@ if bashio::config.has_value 'networkdisks'; then
|
|||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -f ERRORCODE ]; then rm ERRORCODE*; fi
|
if [ -f ERRORCODE ]; then rm ERRORCODE; fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user