mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-28 23:47:40 +01:00
Update 00-smb_mounts.sh
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user