Document /root/bin as the real install location (symlinked from /usr/local/bin)
This commit is contained in:
@@ -91,9 +91,14 @@ ssh admin.yttrx.com 'docker exec yttrx-welcomebot python -c \
|
|||||||
|
|
||||||
### Viewing logs
|
### Viewing logs
|
||||||
|
|
||||||
A `welcomebot-logs` CLI is installed at `/usr/local/bin/welcomebot-logs` on
|
A `welcomebot-logs` CLI lives at `/root/bin/welcomebot-logs` on admin.yttrx.com
|
||||||
admin.yttrx.com (source: `bin/welcomebot-logs` in this repo). It wraps
|
(source: `bin/welcomebot-logs` in this repo) — `/root/bin` is the homelab's
|
||||||
`docker logs` for the container:
|
standard location for root-owned admin scripts (same convention as `bsd`'s
|
||||||
|
`peteftw-analytics` and the NAS backup scripts). A symlink at
|
||||||
|
`/usr/local/bin/welcomebot-logs` makes the bare command work over
|
||||||
|
non-interactive `ssh admin.yttrx.com welcomebot-logs`, since that doesn't
|
||||||
|
source `~/.bashrc` and so wouldn't otherwise see `/root/bin` on `PATH`. It
|
||||||
|
wraps `docker logs` for the container:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh admin.yttrx.com welcomebot-logs # last 200 lines
|
ssh admin.yttrx.com welcomebot-logs # last 200 lines
|
||||||
@@ -105,10 +110,10 @@ ssh admin.yttrx.com 'welcomebot-logs --help'
|
|||||||
|
|
||||||
### Inspecting signup-IP classification history
|
### Inspecting signup-IP classification history
|
||||||
|
|
||||||
`welcomebot-signups` (also `/usr/local/bin/welcomebot-signups`, source
|
`welcomebot-signups` (`/root/bin/welcomebot-signups`, symlinked from
|
||||||
`bin/welcomebot-signups`) reads the persistent `signup_ip` sqlite table
|
`/usr/local/bin` same as above; source `bin/welcomebot-signups`) reads the
|
||||||
directly — a permanent record of every classification decision, independent
|
persistent `signup_ip` sqlite table directly — a permanent record of every
|
||||||
of log retention:
|
classification decision, independent of log retention:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh admin.yttrx.com welcomebot-signups # last 20 decisions
|
ssh admin.yttrx.com welcomebot-signups # last 20 decisions
|
||||||
@@ -122,7 +127,9 @@ reinstall with:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
ssh admin.yttrx.com 'cd /root/yttrx-welcomebot && git pull origin main && \
|
ssh admin.yttrx.com 'cd /root/yttrx-welcomebot && git pull origin main && \
|
||||||
install -m755 bin/welcomebot-logs bin/welcomebot-signups /usr/local/bin/'
|
install -m755 bin/welcomebot-logs bin/welcomebot-signups /root/bin/'
|
||||||
|
# /usr/local/bin/welcomebot-{logs,signups} are symlinks to /root/bin — no
|
||||||
|
# need to touch them again once created.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Rollback
|
### Rollback
|
||||||
|
|||||||
Reference in New Issue
Block a user