From 0b8b842766da00c1713d27f03cc6a289163abc5b Mon Sep 17 00:00:00 2001 From: Chuck Ritola Date: Wed, 22 Dec 2021 22:32:50 -0500 Subject: [PATCH] Add instructions for ensuring bands.json is found when running form systemd. Related to #284. --- ...kage-installation-(including-digital-voice).md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Manual-Package-installation-(including-digital-voice).md b/Manual-Package-installation-(including-digital-voice).md index 2b5e8e7..7e1d396 100644 --- a/Manual-Package-installation-(including-digital-voice).md +++ b/Manual-Package-installation-(including-digital-voice).md @@ -282,3 +282,18 @@ The following commands are available: - `sudo systemctl start openwebrx` starts the service manually - `sudo systemctl stop openwebrx` stops the service manually - `sudo systemctl restart openwebrx` restarts the service. This is very useful after changing configuration. + +## Providing a path to bands.json + +OpenWebRX searches for bands.json in the current working directory or from /etc/openwebrx/. If running OpenWebRX as a systemd service, the current working directory provided by systemd is different from the path from which openwebrx is executed. There are a few ways to ensure OpenWebRX finds bands.json: +- Create an OpenWebRX directory: `sudo mkdir /etc/openwebrx/` + then copy bands.json: `sudo cp bands.json /etc/openwebrx/` + +OR +- Create an OpenWebRX directory: `sudo mkdir /etc/openwebrx/` + then create a link: `sudo ln --symbolic /path/to/openwebrx/dir/bands.json /etc/openwebrx/bands.json` + +OR +- Add `WorkingDirectory=/path/to/openwebrx/dir/` to the [Service] section of the systemd unit file. [Please note](https://www.digitalocean.com/community/questions/trying-to-change-workingdirectory-of-systemd-service-unit), the ExecStart line still needs a full path to the executable even if specifying a working directory. + +... if bands.json is found in both the working directory and /etc/openwebrx/, the settings found in bands.json from the working directory override those from /etc/openwebrx/bands.json. \ No newline at end of file