Skip to content

Commit a5842a6

Browse files
committed
docs(readme): streamline install flow and add update/rollback usage
1 parent 7ffd77e commit a5842a6

File tree

1 file changed

+57
-27
lines changed

1 file changed

+57
-27
lines changed

README.md

Lines changed: 57 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,42 +14,38 @@ Every script follows a common format for safe dry-runs, JSON output, and unified
1414

1515
## 🚀 **Quick Start**
1616

17-
### 1. Clone and enter the repo
17+
Install via one command (per‑user, with MOTD, safe by default):
1818

1919
```bash
20-
git clone https://github.com/ShinniUwU/SOLEN.git
21-
cd SOLEN
20+
bash <(curl -sL https://solen.shinni.dev/run.sh) --user --with-motd --yes
2221
```
2322

24-
### 2. Make the runner executable
23+
What this does
24+
- Downloads a verified release, installs a persistent copy under `~/.local/share/solen/latest`, and puts `serverutils` on your PATH (`~/.local/bin`).
25+
- Adds a guarded MOTD snippet for your shell (bash/zsh/fish). You’ll see a colored system summary on new shells.
26+
- Launches a TUI once (skip with `--no-tui`).
2527

26-
```bash
27-
chmod +x serverutils
28-
```
29-
30-
### 3. Run it locally (no install needed)
28+
System‑wide install (admins):
3129

3230
```bash
33-
./serverutils list
34-
./serverutils run motd/solen-motd -- --plain
35-
./serverutils run health/check
31+
bash <(curl -sL https://solen.shinni.dev/run.sh) --global --with-motd --yes
3632
```
3733

38-
### 4. (Optional) Install globally or per-user
34+
This also installs an `/etc/update-motd.d/90-solen` hook on Debian/Ubuntu/Proxmox so SSH logins show the full MOTD.
3935

40-
```bash
41-
# User install (recommended)
42-
./serverutils install-runner --user
43-
export PATH="$HOME/.local/bin:$PATH"
36+
Open the runner any time:
4437

45-
# Or system-wide (requires sudo)
46-
sudo ./serverutils install-runner --global
38+
```bash
39+
serverutils # TUI
40+
serverutils list # scripts with summaries
4741
```
4842

49-
Now you can invoke it from anywhere:
43+
Developers — clone instead of curl:
5044

5145
```bash
52-
serverutils list
46+
git clone https://github.com/ShinniUwU/SOLEN.git
47+
cd SOLEN
48+
./serverutils list
5349
```
5450

5551
---
@@ -68,6 +64,37 @@ The `serverutils` CLI discovers and executes any SOLEN script in the `Scripts/`
6864
**Audit logs** are written to `~/.serverutils/audit.log`.
6965
Override with `SOLEN_AUDIT_LOG` or `SOLEN_AUDIT_DIR`.
7066

67+
### Updates you can trust (quiet, atomic, rollback)
68+
69+
- Check quietly (reads channel manifest; caches result under `~/.local/state/solen`):
70+
71+
```bash
72+
serverutils update # same as: update check
73+
serverutils status # one‑liner update status
74+
```
75+
76+
- Apply an update (verifies checksum and optional signature, swaps atomically, keeps rollback):
77+
78+
```bash
79+
serverutils update apply --yes
80+
serverutils update --rollback # instant rollback to previous
81+
```
82+
83+
- Channels: `stable` (default), `rc`, `nightly` — set via `SOLEN_CHANNEL`.
84+
85+
- Background weekly check (user):
86+
87+
```bash
88+
serverutils install-units --user
89+
systemctl --user daemon-reload
90+
systemctl --user enable --now solen-update-check.timer
91+
```
92+
93+
Security:
94+
- Manifests include sha256 and can be signed in CI. To enforce verification, set `SOLEN_SIGN_PUBKEY_PEM` (PEM public key)
95+
and optional `SOLEN_REQUIRE_SIGNATURE=1` on hosts.
96+
- Updates stage to a temp dir, copy into `~/.local/share/solen/latest`, and keep `latest-prev` for rollback.
97+
7198
---
7299

73100
## 📐 **SOLEN Standards (v0.1)**
@@ -161,30 +188,33 @@ serverutils list
161188

162189
## 🪄 **Show MOTD on Login (Optional)**
163190

164-
To display the SOLEN system summary when opening a terminal:
191+
The installer writes guarded blocks to bash/zsh/fish rc files so new shells show a colored system summary.
192+
System‑wide installs also add `/etc/update-motd.d/90-solen` for SSH logins.
165193

166194
**Bash / Zsh**
167195

168196
```bash
169-
[[ $- == *i* ]] && serverutils run motd/solen-motd -- --plain
197+
[[ $- == *i* ]] && serverutils run motd/solen-motd -- --full
170198
```
171199

172200
**Fish**
173201

174202
```fish
175203
if status is-interactive
176-
serverutils run motd/solen-motd -- --plain
204+
serverutils run motd/solen-motd -- --full
177205
end
178206
```
179207

180-
Or run:
208+
Or let the runner print a tailored snippet:
181209

182210
```bash
183211
serverutils setup-motd
184212
```
185213

186-
It prints the snippet for your shell — no files modified automatically.
187-
See [`docs/MOTD.md`](./docs/MOTD.md) for system-wide SSH setup.
214+
Tips
215+
- Hooks run the runner with `SOLEN_RUN_QUIET=1` to hide extra chatter.
216+
- Prefer monochrome? replace `--full` with `--plain`.
217+
- See [`docs/MOTD.md`](./docs/MOTD.md) for details and system-wide setup.
188218

189219
---
190220

0 commit comments

Comments
 (0)