`reload` validates the binding file and sends SIGHUP to the live owner; the running connector re-reads it and swaps guildName, channels, users and limits in place. name, seat, guildId, botUserId, tokenFile, engine and context are fixed for the life of the process; a change there, an invalid file or a channel outside the guild refuses the reload and keeps the old binding. Every attempt is one line in reloads.jsonl. The service unit maps `systemctl --user reload` to the same signal. A user entry may carry `channels`, an allowlist of listed channel ids; absent means every listed channel. Outside the list the message is dropped as channel-not-for-user; threads count as their parent. Suite 41/41, 101 node tests. QUEUE rows 19 and 20 opened. Co-Authored-By: Claude Fable 5.1 <[email protected]>
9 lines
485 B
Bash
Executable File
9 lines
485 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# `scripts/discord.sh check|run|stop|unlock|recover|reload <binding>`: the Discord connector for
|
|
# one seat on one server. See packages/discord/README.md. The binding lives
|
|
# at <dataRoot>/discord/<binding>.json (0600, never committed); the token
|
|
# stays in the seat's private secrets directory and is read at runtime only.
|
|
set -euo pipefail
|
|
REPO="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
exec node "$REPO/packages/discord/src/cli.mjs" "$@" --repo "$REPO"
|