mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-28 18:03:04 +00:00
nixos/deconz: delay signalling service readiness until it's actually up
Fixes test flakiness (`nix-build -A nixosTests.deconz`).
This commit is contained in:
parent
fd0b14a61d
commit
d4b989cafc
@ -93,6 +93,13 @@ in
|
||||
# be garbage collected. Ensure the file gets "refreshed" on every start.
|
||||
rm -f ${stateDir}/.local/share/dresden-elektronik/deCONZ/zcldb.txt
|
||||
'';
|
||||
postStart = ''
|
||||
# Delay signalling service readiness until it's actually up.
|
||||
while ! "${lib.getExe pkgs.curl}" -sSfl -o /dev/null "http://${cfg.listenAddress}:${toString cfg.httpPort}"; do
|
||||
echo "Waiting for TCP port ${toString cfg.httpPort} to be open..."
|
||||
sleep 1
|
||||
done
|
||||
'';
|
||||
environment = {
|
||||
HOME = stateDir;
|
||||
XDG_RUNTIME_DIR = "/run/${name}";
|
||||
|
Loading…
Reference in New Issue
Block a user