Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ journalctl --user -u bb_clientd -f

By default, bb\_clientd will use the configuration file that is also
shipped with this repository. It is possible to override configuration
options by creating a file named `~/.config/bb_clientd.jsonnet` that
uses the following structure:
options by creating a file named `~/.config/bb_clientd/bb_clientd.jsonnet`
that uses the following structure:

```jsonnet
local defaultConfiguration = import 'bb_clientd_defaults.jsonnet';
Expand Down
14 changes: 12 additions & 2 deletions configs/linux/launch_bb_clientd_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,19 @@ if [ "$1" = "start" ]; then
# Use either the user provided or system-wide configuration file, based
# on whether the former is present.
config_file=/usr/lib/bb_clientd/bb_clientd.jsonnet
personal_config_file="${HOME}/.config/bb_clientd.jsonnet"
personal_config_file="${HOME}/.config/bb_clientd/bb_clientd.jsonnet"

# TODO: 2025-04-08 Remove migration code after a year.
old_personal_config_file="${HOME}/.config/bb_clientd.jsonnet"
if [ -f "$old_personal_config_file" ]; then
echo "Found ${old_personal_config_file}, moving it to ${personal_config_file}"
mkdir -p "${HOME}/.config/bb_clientd"
mv "$old_personal_config_file" "$personal_config_file"
fi
rm -f "${HOME}/.config/bb_clientd_defaults.jsonnet"

if [ -f "${personal_config_file}" ]; then
ln -sf "${config_file}" "${HOME}/.config/bb_clientd_defaults.jsonnet"
ln -sf "${config_file}" "${HOME}/.config/bb_clientd/bb_clientd_defaults.jsonnet"
config_file="${personal_config_file}"
fi

Expand Down