diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index 2ad0133b0..e067b8646 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -174,7 +174,12 @@ if bashio::config.has_value 'networkdisks'; then # Messages if [ "$MOUNTED" = true ] && mountpoint -q /mnt/"$diskname"; then - rm ERRORCODE + + # Remove errorcode + if [ -f ERRORCODE ]; then + rm ERRORCODE + fi + #Test write permissions # shellcheck disable=SC2015 touch "/mnt/$diskname/testaze" && rm "/mnt/$diskname/testaze" &&