- Replace fragile head -c 100 | grep content check with curl -w
'%{http_code}' for accurate HTTP status detection
- The old check incorrectly rejected legitimate HTML template files
(base.html starts with <!DOCTYPE html>)
- wget fallback uses its exit code instead (no content scanning)
- Moved templates from src/web/templates/ to web/templates/ and
static CSS from src/web/static/ to web/static/
- Updated handlers.go paths (src/web/ → web/) so the binary looks
for templates at the correct deployment location
- Updated install.sh to create web/templates/ and web/static/
directories and download the files from the repo
- Removed old src/web/ directory (dead code)
- Rebuilt inboxer binary with corrected template paths
- Add ReadWritePaths=/opt/inboxer/data /opt/inboxer/logs to the systemd unit
so ProtectSystem=full doesn't block SQLite DB and log file creation
- Wrap systemctl start with timeout 30s so the script never hangs forever
if the service start job blocks
install.sh now fetches bin/inboxer, bin/config.yaml, and bin/prompt.txt
from https://git.lohmar.co.uk/cclohmar/inboxer/raw/branch/main/bin/
so the script works as a standalone remote installer:
curl -sSL https://git.lohmar.co.uk/cclohmar/inboxer/raw/branch/main/install.sh | sudo bash
Supports both curl and wget; validates downloads are not HTML error pages.
README.md rewritten with:
- One-line install command
- Manual build & deploy instructions
- Full configuration reference table
- Service management commands
- Architecture overview
All configuration (including secrets) now lives in a single file:
bin/config.yaml. The separate .env file has been eliminated.
Changes:
- config.go: Added SMTPSettings struct + AI.APIKey to Config; removed
godotenv import, Environment struct, and all os.Getenv() calls
- config.yaml: Added smtp section (host/port/username/password) and
ai.api_key field with placeholder values
- main.go: Reads SMTP and API key from cfg instead of env
- smtp.go: Changed Port field from string to int
- otp_test.go: Updated Port values to int
- .env.example: Deleted (all config is in config.yaml)
- .gitignore: Removed .env.example; kept .env for safety
- go.mod/go.sum: Removed github.com/joho/godotenv dependency
- install.sh: No longer creates .env or uses EnvironmentFile;
warns about placeholder values in config.yaml instead
Anyone cloning the repo can now see exactly which environment variables
are required by reading .env.example at the repo root.
install.sh updated to copy .env.example during deployment (rather than
duplicating the template inline), keeping the two in sync.