Commit Graph

81 Commits

Author SHA1 Message Date
Leopere 7ea275f7e6
Modernize bootstrap: fix bugs, idempotent reruns, OS/arch detection
Security / correctness:
- Remove embedded basic-auth credential in scripts/bootstrap.sh (was fetching
  zsh-setup.sh via a credentialed URL when the binary was already installed
  by strap.sh into /usr/local/sbin/zsh-setup; the .profile dance + curl was
  dead code).
- Drop pre-install eval of `sentry-cli bash-hook` (sentry-cli was never
  installed by this repo, so the call halted under `set -e`).
- Fix /root/.ssh order-of-operations: mkdir + chmod before writing
  authorized_keys, and append-if-missing instead of clobbering existing keys.
- Replace `defaults-bootstrap|*` wildcard in strap.sh with an explicit error
  arm so typos no longer silently run defaults.
- Pass `nosalt` (the actual recognized token) as the salt arg to bootstrap.sh
  instead of `nogluster`, which fell through to the help branch.

Modernization:
- Drop docker-compose v1 binary download; rely on docker-compose-plugin only.
- CTOP install detects arch (amd64/arm64) via `dpkg --print-architecture`.
- Salt repo URLs detect Ubuntu codename + version + arch from /etc/os-release
  instead of hardcoding jammy/22.04/amd64.
- Drop deprecated `apt-get --force-yes`.
- Remove obsolete `version: '3.7'` from docker-compose.yml.
- Add `--no-install-recommends` to apt installs.

Robustness / idempotency:
- `set -euo pipefail` across all three scripts.
- `append_unique` helper guards every `.zshrc` edit so reruns no longer
  duplicate `SENTRY_DSN`, `DOCKER_BUILDKIT`, plugin block, etc.
- Replace `USRDIR=$(echo ~)` with `$HOME` / explicit defaults.
- chsh now skipped if zsh is already the user's shell, and the trailing
  `exec zsh` only runs on an interactive TTY (no more hanging non-interactive
  bootstraps).
- zsh-setup.sh's old .profile cleanup sed actually matches the line written
  by bootstrap.sh.

Architecture:
- Environment overrides: STRAP_BASE_URL, STRAP_AUTHORIZED_KEYS,
  STRAP_SENTRY_DSN, STRAP_SALT_MASTER. Built-in defaults preserve existing
  behavior on a no-env-var invocation.

Default flow (strap.sh / strap.sh defaults-bootstrap → `bootstrap none nosalt`
+ docker + ctop + oh-my-zsh + defaultkey SSH key + SENTRY_DSN) is unchanged.

Shellcheck clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-12 10:11:51 -04:00
colin c0838e5a23 Update README.md 2024-03-20 17:44:41 +00:00
Colin c755daddcf refactor for cleanup 2024-03-20 13:14:22 -04:00
colin de7c443a68 Update strap.sh 2024-03-11 16:51:55 +00:00
colin f1716c93c3 Update README.md 2024-03-11 16:51:09 +00:00
colin cca450790f Update scripts/bootstrap.sh 2023-11-06 01:59:11 +00:00
colin b3783fb851 Fixed zsh and netbird.
Reenable zsh setup and fix url and login.
Pinned Netbird version and updated installation method.
2023-05-10 18:35:24 +00:00
Colin 506d74a2f0
f 2023-01-10 11:47:31 -05:00
Colin e445f6166f
f 2023-01-10 11:40:58 -05:00
Colin 64044f7cc4
Updated deploy user credentials and docs 2023-01-10 11:26:46 -05:00
Colin 0e5ec05bd3
f 2022-12-15 13:00:24 -05:00
ColinK_ 8e53b59402
f 2022-12-04 17:32:51 -05:00
ColinK_ 9b5ad569e9
f 2022-10-28 19:48:28 -04:00
ColinK_ 700705271f
f 2022-10-28 19:44:10 -04:00
ColinK_ cd97356750
f 2022-10-28 19:35:17 -04:00
ColinK_ 643a269747
f 2022-10-28 19:14:58 -04:00
ColinK_ db8554e28c
f 2022-10-28 19:10:18 -04:00
ColinK_ ce946ffc89
f 2022-10-28 19:08:04 -04:00
ColinK_ cca7c766b9
f 2022-10-28 19:03:21 -04:00
ColinK_ b8fbb33f66
f 2022-10-28 18:54:26 -04:00
ColinK_ 98851231f5
f 2022-10-28 18:51:23 -04:00
ColinK_ fac4ef4238
f 2022-10-28 18:49:51 -04:00
ColinK_ 84c7b338ce
f 2022-10-28 18:30:49 -04:00
ColinK_ e434c5c5f1
f 2022-10-28 18:14:04 -04:00
ColinK_ 952dc1493d
f 2022-10-28 18:09:21 -04:00
ColinK_ 0feef73e08
f 2022-10-28 18:01:03 -04:00
ColinK_ a80897759b
f 2022-10-28 17:42:42 -04:00
ColinK_ 6b0b4b1148
f 2022-10-28 16:54:10 -04:00
ColinK_ 23040733ed
f 2022-10-28 16:44:04 -04:00
ColinK_ a2019c374c
f 2022-10-28 15:52:19 -04:00
Colin b3af4302ac f 2022-02-28 10:39:15 -05:00
Colin cf5605a68b f 2022-02-27 23:39:19 -05:00
Colin fb3dad986f f 2022-02-25 12:18:35 -05:00
Colin dd4dd43cef f 2022-02-02 14:11:02 -05:00
Colin e1a701e5de f 2022-02-02 14:01:32 -05:00
Colin 5104579dbd f 2022-02-02 13:55:14 -05:00
Colin 81cc25bb7b f 2022-02-02 13:53:17 -05:00
Colin ea1ea77c4e f 2022-02-02 09:29:39 -05:00
Colin ce91c3acbd f 2022-02-01 13:28:30 -05:00
Colin 7b63abd491 f 2022-02-01 13:27:43 -05:00
Colin d625fbf064 f 2022-02-01 13:18:52 -05:00
Colin 095c69f6a1 f 2022-01-15 15:17:10 -05:00
Colin 579025eff5 f 2022-01-15 15:14:18 -05:00
Colin a3801f8226 f 2022-01-15 15:10:21 -05:00
Colin 7b16f009fe f 2022-01-15 15:01:00 -05:00
Colin 55bae877ba f 2022-01-15 14:45:10 -05:00
computer 9b3597e296 f 2021-12-21 11:55:36 -05:00
computer c6536d6121 f 2021-12-21 11:42:46 -05:00
computer 251a387a78 soyoustartstrap 2021-12-20 12:37:38 -05:00
computer 225f032799 fixup 2021-12-07 22:47:00 -05:00