summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/systemd.nix
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/systemd.nix')
-rw-r--r--accounts/gkleen@sif/systemd.nix7
1 files changed, 6 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/systemd.nix b/accounts/gkleen@sif/systemd.nix
index eff9aa5e..de28895e 100644
--- a/accounts/gkleen@sif/systemd.nix
+++ b/accounts/gkleen@sif/systemd.nix
@@ -24,10 +24,15 @@ let
24 pid=$! 24 pid=$!
25 ${pkgs.systemd}/bin/systemd-notify --pid="''${pid}" 25 ${pkgs.systemd}/bin/systemd-notify --pid="''${pid}"
26 26
27 while ! ${pkgs.netcat-openbsd.nc}/bin/nc -z -v localhost ''${port}; do 27 check_pid() {
28 ${pkgs.lsof}/bin/lsof -Pi @localhost:"''${port}" -sTCP:LISTEN -t
29 }
30
31 while ! check_pid; do
28 ${pkgs.coreutils}/bin/sleep 0.1 32 ${pkgs.coreutils}/bin/sleep 0.1
29 done 33 done
30 34
35 ${pkgs.systemd}/bin/systemd-notify --pid=$(check_pid)
31 ${pkgs.systemd}/bin/systemd-notify --ready 36 ${pkgs.systemd}/bin/systemd-notify --ready
32 37
33 wait "''${pid}" 38 wait "''${pid}"