mirror of
https://github.com/kmein/niveum
synced 2026-03-21 04:11:07 +01:00
feat: convert to flake
feat(zaatar): convert to flake feat(tahina, tabula): convert to flake feat(makanek): convert to flake feat(manakish, zaatar): convert to flake feat(ci): build flake systems fix: ci build feat: secrets via submodule foo foo foo
This commit is contained in:
17
packages/untilport.nix
Normal file
17
packages/untilport.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{pkgs, ...}:
|
||||
pkgs.writers.writeDashBin "untilport" ''
|
||||
set -euf
|
||||
|
||||
usage() {
|
||||
echo 'untiport $target $port'
|
||||
echo 'Sleeps until the destinated port is reachable.'
|
||||
echo 'ex: untilport google.de 80 && echo "google is now reachable"'
|
||||
}
|
||||
|
||||
|
||||
if [ $# -ne 2 ]; then
|
||||
usage
|
||||
else
|
||||
until ${pkgs.libressl.nc}/bin/nc -z "$@"; do sleep 1; done
|
||||
fi
|
||||
''
|
||||
Reference in New Issue
Block a user