From 361a169d37f0f411733550d683a158dc85c85557 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:23:57 +0200 Subject: [PATCH] Update 00-smb_mounts.sh --- .templates/00-smb_mounts.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index 64ba6b4f5..3c14f0913 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -66,10 +66,11 @@ if bashio::config.has_value 'networkdisks'; then # Does server exists if command -v "nc" &>/dev/null; then # test if smb port is open - nc -w 2 -z "$server" 445 2>/dev/null || \ + nc -w 1 -z "$server" 445 2>/dev/null || \ # test with ping also if different port is used - ping -w 2 -c 1 "$server" >/dev/null || \ - bashio::log.warning "Your server $server from $disk doesn't seem reachable, is it correct?" + echo "... warning : SMB port not opened, trying ping" && ping -w 1 -c 1 "$server" >/dev/null || \ + echo "... warning : ping not successful, trying smbclient" && smbclient -t 1 -L "$server" -N &>/dev/null || \ + { bashio::log.warning "Your server $server from $disk doesn't seem reachable, script will stop"; break; } fi # Try smbv1