diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 14:53:33 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2020-12-30 14:53:33 +0000 |
commit | b4c5251ad58cf60d00700db34e104fd75f78edea (patch) | |
tree | f7a1c851b6e926e2294b9b10ae6b30c4b1ae374a | |
parent | b927aa1d91d50887e3bb5fa4333687d8ab373828 (diff) | |
download | battd-b4c5251ad58cf60d00700db34e104fd75f78edea.tar.gz battd-b4c5251ad58cf60d00700db34e104fd75f78edea.tar.xz battd-b4c5251ad58cf60d00700db34e104fd75f78edea.zip |
add readme
-rw-r--r-- | README.md | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..d318ecf --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# battd + +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. + +## Installation + +Directly install `run`, `conf` and `battcheck` in a service directory. + +## Usage + +Configure `conf` appropriately. This should contain three functions: + +`interval` +: Called to determine the polling interval (see below). + +`check` +: Called to determine the battery status. + +`failed` +: 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). |