This repository has no description
426 B
19 lines
1# Copied from stockholm krebs/5pkgs/simple/untilport (cc283503).
2{ libressl, writers }:
3
4writers.writeDashBin "untilport" ''
5 set -euf
6
7 usage() {
8 echo 'untiport $target $port'
9 echo 'Sleeps until the destinated port is reachable.'
10 echo 'ex: untilport google.de 80 && echo "google is now reachable"'
11 }
12
13
14 if [ $# -ne 2 ]; then
15 usage
16 else
17 until ${libressl.nc}/bin/nc -z "$@"; do sleep 1; done
18 fi
19''