Correctly store enabled channels across reloads

This commit is contained in:
Nick Chambers 2021-06-23 13:16:25 -05:00
parent bafccdb8af
commit f802ce0add
1 changed files with 4 additions and 2 deletions

6
rowbot
View File

@ -284,7 +284,7 @@ alarm-handler() {
trap alarm-handler ALRM
config-reload() {
local file
local file key recording
info "received HUP signal"
for file in "${prog_args[@]}"; do
@ -311,7 +311,9 @@ config-reload() {
if [[ -v markov_chains[@] ]]; then
for key in "${!enabled[@]}"; do
recording+=",%s=%s" "$key" "${enabled[$key]}"
# This is a scalar string, not an array.
# shellcheck disable=SC2179
recording+=",$key=${enabled[$key]}"
done
export RECORDING=${recording#,}