From 5b649a2f17a71bf57a922119f18c76dd474998e0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Wed, 27 Sep 2023 22:46:12 +0200 Subject: [PATCH] Update 00-smb_mounts.sh --- .templates/00-smb_mounts.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.templates/00-smb_mounts.sh b/.templates/00-smb_mounts.sh index 4c12123d5..504bdcf71 100755 --- a/.templates/00-smb_mounts.sh +++ b/.templates/00-smb_mounts.sh @@ -61,7 +61,10 @@ if bashio::config.has_value 'networkdisks'; then # Does server exists server="$(echo "$disk" | grep -E -o "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+")" if command -v "nc" &>/dev/null; then - nc -w 2 -z "$server" 22 2>/dev/null || \ + # test if smb port is open + nc -w 2 -z "$server" 445 2>/dev/null || \ + # test with ping also if different port is used + ping -w 5 -c 1 "$server" >/dev/null || \ bashio::log.warning "Your server $server from $disk doesn't seem reachable, is it correct?" fi