Update 92-smb_mounts_v1.3.sh

This commit is contained in:
Alexandre
2021-04-29 10:25:48 +02:00
committed by GitHub
parent f4a2240902
commit c675bf3893

View File

@@ -33,11 +33,11 @@ if bashio::config.has_value 'networkdisks'; then
bashio::log.info "... trying to mount with default options"
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN $disk /mnt/$diskname
#Tries to force uid/gid 0/0
#If mounting failed
if [ $? != 0 ]; then
#Tries to force uid/gid 0/0
bashio::log.info "... trying to force uid 0 gid 0"
mount -t cifs -o rw,iocharset=utf8,file_mode=0777,dir_mode=0777,uid=0,gid=0,forceuid,forcegid,username="$CIFS_USERNAME",password="${CIFS_PASSWORD}"$DOMAIN $disk /mnt/$diskname
fi
# if Fail test different smb and sec versions
while [ $? -ne 0 ]; do
@@ -54,6 +54,7 @@ if bashio::config.has_value 'networkdisks'; then
done
done
done
fi
# Messages
if [ $? = 0 ]; then