From ef42da52de127c43e1216e06281b89939615cc7d Mon Sep 17 00:00:00 2001 From: Audric Date: Tue, 12 May 2026 16:48:59 +0200 Subject: [PATCH] docs(install): document config-dir override at build and runtime Add a subsection to "Build" covering CMAKE_INSTALL_SYSCONFDIR for baking a custom config directory into the binary (the common case: -DCMAKE_INSTALL_SYSCONFDIR=/etc to read /etc/svxlink/svxreflector.conf), the --config runtime override, and the full lookup order at startup. --- docs/INSTALL.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/docs/INSTALL.md b/docs/INSTALL.md index d6d6f2f..36e33e1 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -79,6 +79,35 @@ Behavior with the feature disabled: startup (since Redis-mode auth would not work). Remove the `[REDIS]` section before starting. +### Optional: change where the binary looks for its config + +By default the binary is built to look for its config under +`${CMAKE_INSTALL_PREFIX}/etc/svxlink/svxreflector.conf` (typically +`/usr/local/etc/svxlink/svxreflector.conf`). To make it look under +`/etc/svxlink/` instead — the usual Debian/Ubuntu location — add +`-DCMAKE_INSTALL_SYSCONFDIR=/etc` at configure time: + +```bash +cmake -S src -B build -DLOCAL_STATE_DIR=/var -DCMAKE_INSTALL_SYSCONFDIR=/etc +cmake --build build +``` + +Any absolute path works; `/svxlink` is appended automatically. For example +`-DCMAKE_INSTALL_SYSCONFDIR=/opt/myreflector` makes the binary read +`/opt/myreflector/svxlink/svxreflector.conf`. + +You can also override the location at runtime, without rebuilding, via the +`--config` flag: + +```bash +svxreflector --config /path/to/svxreflector.conf +``` + +For a systemd-managed install, add the flag to the unit's `ExecStart=` line. + +The full lookup order at startup is: `--config` argument → +`~/.svxlink/svxreflector.conf` → the compiled-in path above. + --- ## 3. Stop the running service