diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 22:27:33 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 22:27:33 +0000 |
commit | c560f0f02ddf51a3ce38a945b48ecf49a138e38d (patch) | |
tree | d737adbd10e3506df148f8b654c1dc5271f5c6e2 /README.md | |
parent | 2709a996bbce438f4ca94256441b705fe9e534f6 (diff) | |
download | battd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.tar.gz battd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.tar.xz battd-c560f0f02ddf51a3ce38a945b48ecf49a138e38d.zip |
Simpler and more flexible interval handling
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 15 |
1 files changed, 4 insertions, 11 deletions
@@ -2,9 +2,9 @@ A simple battery daemon written for use with a daemontools-style supervisor. -`run` polls the status of a `check` function with a regular interval. On the -transition from a successful `check` exit status to an unsuccessful `check` exit -status the `failed` function is called. +`run` polls the status of a `check` function with an interleaved call to +`interval`. On the transition from a successful `check` exit status to an +unsuccessful `check` exit status the `failed` function is called. ## Installation @@ -20,7 +20,7 @@ Adjust the above as needed. Configure `conf` appropriately. This should contain three functions: `interval` -: Called to determine the polling interval (see below). +: Called between consecutive calls to `check`. `check` : Called to determine the battery status. @@ -29,10 +29,3 @@ Configure `conf` appropriately. This should contain three functions: : Called when the battery status has transitioned from a successful to a failing return. -Optionally two variables can be set: - -`long_interval` -: The polling interval when `interval` returns success (default: 300). - -`short_interval` -: The polling interval when `interval` returns failure (default: 30). |