Explorar el Código

search for peer

Daniel Sheffield hace 2 días
padre
commit
ba29c8e084
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      termux-shortcuts/.shortcuts/sweep.sh

+ 5 - 2
termux-shortcuts/.shortcuts/sweep.sh

@@ -29,5 +29,8 @@ findpeer(){
     done
     wait
 }
-exit 0
-findpeer "$PREFIX" "$MYIP"
+PEERIP="$(findpeer "$PREFIX" "$MYIP")"
+[ "$PEERIP" ] || {
+    echo "Failed to find peer on $IFACE (${PREFIX}.0/24)" >&2
+    exit 1
+}