Replace ntfy.state_dir with a top-level [state] dir
The job store is to keep its database in the directory that holds the ntfy subscriptions' state files, so the directory moves to a section of its own: [state] dir, or UBERBRINGER_STATE_DIR, in place of [ntfy] state_dir. For now only the subscriptions use it. It still has no default and is still required with a subscription, and the checks at start name state.dir in their errors. install.sh writes [state] dir into new configs, and the Docker image sets UBERBRINGER_STATE_DIR. ntfy.state_dir has never been in a release, so its CHANGELOG entry changes in place and there is no fallback: a config that still sets it fails to load with an unknown key until the line moves to [state]. The image itself was not built, since the workstation has no Docker. Part of stage 1b of docs/plans/job-store.md. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f0b5bf020e
commit
66531e7314
16 files changed
+92
-68
No files matched your search
+10
-7
@@ -13,7 +13,7 @@ shows every setting with its default: copy it to `config.toml` to start.
|
||||
- [Settings](#settings): [webserver](#webserver), [api](#api),
|
||||
[printer](#printer), [format](#format), [ntfy](#ntfy),
|
||||
[ntfy subscriptions](#ntfy-subscriptions), [queue](#queue),
|
||||
[images](#images), [sentry](#sentry), [log](#log)
|
||||
[state](#state), [images](#images), [sentry](#sentry), [log](#log)
|
||||
- [Logs](#logs)
|
||||
|
||||
## Loading
|
||||
@@ -121,10 +121,6 @@ These settings shape the [notification cards](api.md#notification-cards)
|
||||
of the `notify` and `ntfy` modules and of the [ntfy subscriptions](ntfy.md),
|
||||
and their [digests](api.md#digests).
|
||||
|
||||
| Key | Default | Meaning |
|
||||
|-----|---------|---------|
|
||||
| `state_dir` | none | The directory the ntfy subscriptions keep their state in, one `ntfy-<name>.json` file each, readable by the daemon's user only. Required with a subscription. `install.sh` and the Docker image set it to `/var/lib/uberbringer` |
|
||||
|
||||
`[ntfy.format]`:
|
||||
|
||||
| Key | Default | Meaning |
|
||||
@@ -143,8 +139,9 @@ tags, at most 16 characters each, and `""` hides a tag: `backup = "[B]"`,
|
||||
### ntfy subscriptions
|
||||
|
||||
Each `[[ntfy.subscriptions]]` table is one connection to one ntfy server,
|
||||
for one or more topics. They are set in the file only.
|
||||
[ntfy.md](ntfy.md) shows an example and how a subscription behaves.
|
||||
for one or more topics. They are set in the file only, and need
|
||||
[`state.dir`](#state). [ntfy.md](ntfy.md) shows an example and how a
|
||||
subscription behaves.
|
||||
|
||||
| Key | Default | Meaning |
|
||||
|-----|---------|---------|
|
||||
@@ -178,6 +175,12 @@ Quiet hours are off unless the subscription has a
|
||||
| `size` | `100` | Jobs that may wait to print; more get `503` `queue_full` |
|
||||
| `history` | `1000` | Finished jobs whose status is kept; an older job's ID answers `404` `job_not_found` |
|
||||
|
||||
### state
|
||||
|
||||
| Key | Default | Meaning |
|
||||
|-----|---------|---------|
|
||||
| `dir` | none | The directory the [ntfy subscriptions](#ntfy-subscriptions) keep their state in, one `ntfy-<name>.json` file each, readable by the daemon's user only. Required with a subscription. `install.sh` and the Docker image set it to `/var/lib/uberbringer` |
|
||||
|
||||
### images
|
||||
|
||||
| Key | Default | Meaning |
|
||||
|
||||
Reference in new issue
Block a user