Explorar el Código

Check AFP and SMB -- apparently some modems intercept SMB traffic. This is slightly out-of-band but should be pretty reliable. It also leaks less data about our intent when the endpoint is unreachable (as is the common case on public networks)

Zachary Kotlarek hace 10 años
padre
commit
692cc80895
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      mountMedia

+ 4 - 3
mountMedia

@@ -74,9 +74,10 @@ if [ $LOCAL_LINK -eq 0 ] && [ $FORCE -eq 0 ] && ~/bin/video/isMediaMounted; then
 fi
 
 # Check for connectivity and server live-ness
-if ! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 139 >/dev/null 2>&1; then
-	echo "`basename "${0}"`: Host not available: ${HOST}" 1>&2
-	OFFLINE=1
+if ! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 548 >/dev/null 2>&1 || \
+	! ~/bin/video/timeout -t "${TIMEOUT}" nc -z "${HOST}" 139 >/dev/null 2>&1; then
+		echo "`basename "${0}"`: Host not available: ${HOST}" 1>&2
+		OFFLINE=1
 fi
 
 # Drop local links if we're online