mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-03 16:00:29 +01:00
Nc instead ping
This commit is contained in:
@@ -60,9 +60,9 @@ 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 ping -w 5 -c 1 8.8.8.8 >/dev/null; then
|
||||
ping -w 5 -c 1 "$server" >/dev/null || \
|
||||
bashio::log.warning "Your server $server from $disk doesn't ping, is it correct?"
|
||||
if nc -w 2 -z 8.8.8.8 22 2>/dev/null; then
|
||||
nc -w 2 -z "$server" 22 2>/dev/null || \
|
||||
bashio::log.warning "Your server $server from $disk isn't reachable, is it correct?"
|
||||
fi
|
||||
|
||||
# Prepare mount point
|
||||
|
||||
Reference in New Issue
Block a user