-
Notifications
You must be signed in to change notification settings - Fork 721
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workbench: empty the exit_code file before a supervisord program is s…
…tarted
- Loading branch information
Showing
2 changed files
with
43 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ pkgs | ||
, runJq | ||
, backend | ||
, profile | ||
, nodeSpecs | ||
}: | ||
|
||
with pkgs.lib; | ||
|
||
let | ||
## | ||
## generator-service :: (TracerConfig, NixosServiceConfig, Config, StartScript) | ||
## | ||
healthcheck-service = | ||
(nodeSpecs: | ||
let | ||
bashInteractive = pkgs.bashInteractive; | ||
coreutils = pkgs.coreutils; | ||
supervisor = pkgs.supervisor; | ||
in { | ||
startupScript = rec { | ||
JSON = pkgs.writeScript "startup-healthcheck.sh" value; | ||
value = '' | ||
#!${bashInteractive}/bin/sh | ||
# Store the entrypoint env vars for debugging purposes | ||
${coreutils}/bin/env > /local/healthcheck.env | ||
# Only needed for "exec" ? | ||
if test "''${TASK_DRIVER}" = "exec" | ||
then | ||
cd "''${TASK_WORKDIR}" | ||
fi | ||
sleep 100000 | ||
''; | ||
}; | ||
}) | ||
nodeSpecs.value; | ||
in | ||
{ inherit healthcheck-service; } |