|
1 | | -# test_openbsd_setup.sh |
| 1 | +# openbsd-server |
2 | 2 |
|
3 | | -A self-contained TAP-compatible test script that verifies whether an OpenBSD server has been correctly configured to host a Git-backed Obsidian vault. |
| 3 | +A collection of scripts to configure and validate an OpenBSD server for hosting a Git-backed Obsidian vault. |
4 | 4 |
|
5 | | -This script is safe to run repeatedly. It performs **non-destructive**, **read-only checks** covering: |
| 5 | +--- |
| 6 | + |
| 7 | +## Scripts |
| 8 | + |
| 9 | +### v0.1 |
6 | 10 |
|
7 | | -- User account setup and shell assignment |
8 | | -- File permissions and `doas` policy |
9 | | -- Static network configuration and DNS |
10 | | -- SSH hardening settings |
11 | | -- Git install and push access |
12 | | -- Bare repo structure and safe directory flags |
| 11 | +- **openbsd_server_rebuild_public_v0.1.sh** |
| 12 | + Automates setup of a fresh OpenBSD server so that it passes our validation tests. |
13 | 13 |
|
14 | | -> ⚠️ Currently versioned as `v0.1` — an early public release. Contributions, issues, and suggestions are welcome. |
| 14 | +- **test_openbsd_setup_public_v0.1.sh** |
| 15 | + A self-contained TAP-compatible test suite that checks: |
| 16 | + - User account setup & shells |
| 17 | + - File permissions & doas policy |
| 18 | + - Static network config & DNS |
| 19 | + - SSH hardening |
| 20 | + - Git installation & push access |
| 21 | + - Bare-repo structure & safe directory flags |
| 22 | + |
| 23 | +### v0.1.1 (test enhancements) |
| 24 | + |
| 25 | +- **test_openbsd_setup_public_v0.1.1.sh** |
| 26 | + Prep for next iteration—adds additional checks and refactors existing tests. |
15 | 27 |
|
16 | 28 | --- |
17 | 29 |
|
18 | | -## 🔧 Usage |
| 30 | +## Usage |
| 31 | + |
| 32 | +### Run the tests |
19 | 33 |
|
20 | 34 | ```sh |
21 | | -sh test_openbsd_setup.sh |
22 | | -```` |
| 35 | +sh test_openbsd_setup_public_v0.1.sh |
| 36 | +``` |
23 | 37 |
|
24 | | -### Optional: Override defaults via environment variables |
| 38 | +Or (for the upcoming iteration): |
25 | 39 |
|
26 | 40 | ```sh |
| 41 | +sh test_openbsd_setup_public_v0.1.1.sh |
| 42 | +``` |
| 43 | + |
| 44 | +You can override any default via environment variables: |
| 45 | + |
| 46 | +``` |
27 | 47 | REG_USER=obsidian \ |
28 | 48 | GIT_USER=git \ |
29 | 49 | VAULT=myvault \ |
30 | 50 | INTERFACE=em0 \ |
31 | 51 | STATIC_IP=192.0.2.10 \ |
32 | | -sh test_openbsd_setup.sh |
| 52 | +sh test_openbsd_setup_public_v0.1.sh |
33 | 53 | ``` |
34 | 54 |
|
35 | | ---- |
36 | | - |
37 | | -## 📋 Output Format |
38 | | - |
39 | | -This script uses the [TAP](https://testanything.org/) (Test Anything Protocol) format, making it easy to use in pipelines or automated test harnesses. |
40 | | - |
41 | | -Sample output: |
| 55 | +Run the setup |
42 | 56 |
|
43 | 57 | ``` |
44 | | -ok 1 - user 'obsidian' exists with ksh shell |
45 | | -ok 2 - user 'git' exists with git-shell |
46 | | -... |
47 | | -not ok 14 - sshd_config allows only obsidian,git |
48 | | -... |
49 | | -1..27 |
50 | | -2 of 27 tests failed. |
| 58 | +sh openbsd_server_rebuild_public_v0.1.sh |
51 | 59 | ``` |
52 | 60 |
|
53 | | ---- |
| 61 | +Releases & Tags |
54 | 62 |
|
55 | | -## 📁 Directory Structure Expectations |
| 63 | +I tag each public version so you can grab a ZIP directly: |
56 | 64 |
|
57 | | -- Bare repo: `/home/git/vaults/vault.git` |
58 | | - |
59 | | -- Working clone: `/home/obsidian/vaults/vault` |
60 | | - |
61 | | -- Setup script lives at: `/root/openbsd-server/` |
62 | | - |
| 65 | + v0.1 – passing setup and test suite |
63 | 66 |
|
64 | | ---- |
| 67 | + v0.1.1 – next-iteration test enhancements |
| 68 | + |
| 69 | +If you haven’t already: |
| 70 | + |
| 71 | +```sh |
| 72 | +git push origin --tags |
| 73 | +``` |
65 | 74 |
|
66 | | -## 🪪 License |
| 75 | +And you can see our formal Releases page on GitHub. |
| 76 | +License |
67 | 77 |
|
68 | | -MIT OR 0BSD — see LICENSE |
| 78 | +MIT OR 0BSD — see the LICENSE file. |
0 commit comments