From 4e2e2fdffcc3ca8e21c622ecd550faf27b236a12 Mon Sep 17 00:00:00 2001 From: rob <9821269+robdevops@users.noreply.github.com> Date: Tue, 13 Oct 2026 20:39:35 +1100 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index b4a686c7..bece7a6a 100644 --- a/README.md +++ b/README.md @@ -439,11 +439,9 @@ uv venv && uv pip install -r requirements.txt ## Setup Configuration is split into two files -- finbot.env for startup environment variables, and preferences.conf for values that can be changed at runtime. -Start by creating both from the shipped templates: +Copy the shipped template: ``` -sudo cp ~/finbot/defaults/finbot.env /opt/finbot.env && sudo chmod 600 /opt/finbot.env && sudo vi /opt/finbot.env -util/sync_defaults.py [-d DEST] --apply # copies preferences.conf into the data directory (never overwrites) -vi /preferences.conf +sudo cp ~/finbot/defaults/finbot.env /opt/finbot.env && sudo chmod 600 /opt/finbot.env ``` ### `finbot.env` @@ -476,7 +474,11 @@ All 17 keys, read by your launcher. A change needs a restart. Blank means unset. | `slackOutgoingToken` | | Token Slack must present (interactive mode) | ### `preferences.conf` items -**Changing settings:** edit `preferences.conf`, then reload. The log shows what changed (`config: future_days 30 -> 45`). If the file has a mistake, the reload reports it (`ERROR config: ...`), applies nothing and leaves finbot running on its previous settings. Check an edit before reloading with `util/check_config.py /opt/finbot.env`. Edit `finbot.env`, then restart: a running bot cannot see it change. + +Copies preferences.conf and metadata files into the data directory (never overwrites) +``` +util/sync_defaults.py [-d DEST] --apply +``` All 25 keys, read by the bot itself. A change takes effect on a reload. @@ -510,6 +512,8 @@ All 25 keys, read by the bot itself. A change takes effect on a reload. A key in the wrong file, or one that is not listed, stops finbot starting; on a reload it is reported and nothing is applied. +edit `preferences.conf`, then reload if running. The service log shows what changed (`config: future_days 30 -> 45`). If the file has a mistake, the reload reports it (`ERROR config: ...`), applies nothing and leaves finbot running on its previous settings. Check an edit before reloading with `util/check_config.py /opt/finbot.env`. Edit `finbot.env`, then restart: a running bot cannot see it change. + **Upgrading from one `.env`?** Run `util/migrate_env.py --write` first if it is in the old dotenv format (`key = 'value' # comment`), then `util/split_env.py /opt/finbot.env`. It writes `finbot.env.new` and `preferences.conf.new` next to it, never overwriting, and lists any key it dropped or did not recognise. Until you split, finbot refuses to start because the one file mixes both kinds of key. ### Data directory