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
5 changes: 3 additions & 2 deletions dev2/agents/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ configuration or task state in Anthony's home.

On dev2, deploy the CLI package and its production dependencies to `/opt/riotcoder-cli`, provision
`/home/riotcoder/.config/cli-tools/mail.json` with only the RiotCoder account, then run
`dev2/agents/install-riotcoder.sh` as root. The installer places the responder and mail tools in
the correct homes and runs the mail poller as UID RiotCoder.
`bash dev2/agents/install-riotcoder.sh` as root. The installer grants RiotCoder's group read
access to the deployed CLI and places the responder and mail tools in the correct homes.
The mail poller runs as UID RiotCoder.
5 changes: 5 additions & 0 deletions dev2/agents/install-riotcoder.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ id "$USER_NAME" >/dev/null
[ -d "$CLI_DIR/node_modules" ] || { echo "CLI runtime dependencies are missing at $CLI_DIR" >&2; exit 1; }
[ -f "$USER_HOME/.config/cli-tools/mail.json" ] || { echo "RiotCoder's private mail configuration is missing" >&2; exit 1; }

# The deploy checkout and dependencies are installed by root; grant RiotCoder's
# own group read/traverse access so the account can execute its CLI tools.
chgrp -R "$GROUP_NAME" "$CLI_DIR"
chmod -R g+rX "$CLI_DIR"

install -d -o "$USER_NAME" -g "$GROUP_NAME" -m 0750 \
"$USER_HOME/.local/bin" "$USER_HOME/.config/agent-identities/riotcoder" "$USER_HOME/.local/state/agent-mail-poll"
install -o root -g root -m 0755 "$SOURCE_DIR/qc-agent-responder.py" /usr/local/libexec/qc-agent-responder
Expand Down
Loading