From cc440de4548bcc72ad615c4b5510b03ff5beba9f Mon Sep 17 00:00:00 2001 From: Nathan L Smith Date: Fri, 1 Jul 2016 16:29:20 -0500 Subject: [PATCH] Add `exec` to tutorial app run hook. Restarting doesn't work properly without it. See #989. Signed-off-by: Nathan L Smith --- www/source/tutorials/getting-started-add-hooks.html.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/www/source/tutorials/getting-started-add-hooks.html.md b/www/source/tutorials/getting-started-add-hooks.html.md index ef5d41b9ad..55c98598cd 100644 --- a/www/source/tutorials/getting-started-add-hooks.html.md +++ b/www/source/tutorials/getting-started-add-hooks.html.md @@ -38,7 +38,12 @@ Perform the following operations in the same directory where the `plan.sh` file #!/bin/sh # cd {{pkg.svc_path}} - npm start + + # `exec` makes it so the process that the Habitat supervisor uses is + # `npm start`, rather than the run hook itself. `2>&1` makes it so both + # standard output and standard error go to the standard output stream, + # so all the logs from the application go to the same place. + exec npm start 2>&1 7. Save the `run` hook file.