[Docs] Update and simplify health-check hook documentation
The `health-check` hook is not run on-demand when Supervisor's HTTP
gateway is accessed.
The sample `health-check` hook was also removed because it was more
confusing than helpful.
@@ -795,7 +795,7 @@ To define a hook, simply create a bash file of the same name in `/my_plan_name/h
File location: `<plan>/hooks/file-updated`. This hook is run whenever a configuration file that is not related to a user or about the state of the service instances is updated.
#### health-check
-File location: `<plan>/hooks/health-check`. This hook is run when the Chef Habitat HTTP API receives a request at `/health`.
+File location: `<plan>/hooks/health-check`. This hook is run periodically on a configurable interval.
The `health-check` script must return a valid exit code from the list below.
@@ -805,28 +805,6 @@ The `health-check` script must return a valid exit code from the list below.
- **3**- unknown
- any other code - failed health check with additional output taken from `health-check` stdout.
-A `health-check` hook can use the following as a template:
-
-```bash hooks/health-check
-#!/bin/sh
-
-# define default return code as 0
-rc=0
-program_that_returns_a_status
-case $? in
- 0)
- rc=1 ;;
- 3)
- rc=0 ;;
- 4)
- rc=2 ;;
- *)
- rc=3 ;;
-esac
-
-exit $rc
-```
-
#### init
File location: `<plan>/hooks/init`. This hook is run when a Chef Habitat topology starts.
