aboutsummaryrefslogtreecommitdiff
path: root/scripts/cmail-setup-finish.sh
Commit message (Collapse)AuthorAgeFilesLines
* chore: open-source release-prep (udev flag, SPDX headers, boolean style)Craig Jennings44 hours1-0/+1
| | | | | | | | Three release cleanups, all behavior-preserving for my machines: - Gated the Logitech BRIO udev rule behind INSTALL_DEVICE_UDEV_RULES (default yes, opt-out), so the device-specific rule is off for anyone without that hardware. Added the config read, validation, and a conf.example entry. - Added a GPL-3.0-or-later SPDX-License-Identifier header after the shebang of all 24 shell scripts in the repo. - Standardized boolean conditionals on the explicit [ "$var" = "true" ] form, replacing the bare `if $var` idiom. The STEPS function-dispatch is left alone, since it runs a function name rather than testing a boolean.
* fix(cmail-setup-finish): verify both Bridge ports and dump status on failureCraig Jennings2026-05-171-2/+8
| | | | | | | | | | | | | | The "verifying Bridge is listening" check used a regex `127\.0\.0\.1:(1143|1025)` against `ss -ltn` output. That matches if *either* port is listening, but the success message claims both are. So a half-broken Bridge (IMAP up, SMTP down or vice versa) would pass the check. I split the check into two greps and report which port is missing. When the check fails, the script now also prints the last 10 lines of `systemctl --user status protonmail-bridge` to stderr so the operator sees the service state immediately instead of being told to go run the command themselves.
* feat(cmail): clean autostart stub and add DNS-wait drop-inCraig Jennings2026-05-131-5/+49
| | | | | | | | I extended cmail-setup-finish.sh with two boot-cleanliness fixes for the systemd --user Bridge service. The autostart cleanup removes ~/.config/autostart/Proton Mail Bridge.desktop, which double-launches Bridge and throws an "orphan instance" dialog every login. The wait-for-dns drop-in installs an ExecStartPre loop that waits up to 30 seconds for DNS before Bridge's first API call. User-instance systemd doesn't carry network-online.target, so After=network.target doesn't imply the resolver is up. The leading '-' makes the pre-step non-fatal so an offline boot still starts the unit.
* feat: add post-install cmail Bridge setupCraig Jennings2026-05-091-0/+79
Bridge first-run is interactive, so I put the cmail wiring in a post-install helper rather than running it inside archsetup. scripts/cmail-setup-finish.sh handles the post-first-run steps idempotently: it decrypts the encrypted cmailpass, copies Bridge's self-signed cert to ~/.config/protonbridge.pem, symlinks the cmail-action triage helper into ~/.local/bin, and enables the user-level protonmail-bridge service. I added loginctl enable-linger in essential_services so the user service survives logout — without it, triaging cmail from a remote agent or SSH session has nothing to talk to. outro prints a four-step runbook for the manual steps after reboot.