v3.2.0
v3.2.0 — Boot service reliability, env file safety, dead-code cleanup
Fixes
Boot service / issue #55 — `./tcproxy --enable-service` starts on reboot
- Unit now runs as `User=root`. The `sudo` calls inside `tcproxy_up` (mount, systemctl, cp, rm) previously needed a tty/password at boot when the unit ran as a normal user — the root cause of #55. Running as root makes those calls no-ops and works on every stock systemd distro out of the box.
- Added `Restart=on-failure` + `RestartSec=30` so transient network hiccups at boot self-recover before the 30-min health-check timer kicks in.
- Dropped `KillMode=none`, which was leaking processes past unit stop.
- `--enable-service` now refuses to install without a prior successful `--install`, so users can no longer enable a unit that will fail on first boot.
Dead error-handling paths
- `lib/systemd.sh` `install_system_service`: the `[ $? -eq 0 ]` check was reading `sleep 3`'s exit code, not `systemctl is-active`'s. The `[ERROR] Failed to start` branch was unreachable. Exit code is now captured before any subsequent command.
- `lib/mount.sh` `check_smb_share`: same dead-branch pattern — `$?` read the preceding `echo`, not `smbclient`. Now uses the already-captured `VM_SMB_CHECK`.
Env file safety (`.tcproxy.env`)
- Permissions tightened from `770` → `600`. The file contains `TC_PASSWORD` in clear text.
- All values now double-quoted with backslash/quote escaping. Previously, a `TC_PASSWORD` containing a space, `#`, or quote character would break systemd's strict `EnvironmentFile=` parsing and prevent the boot unit from starting.
Identity handling
- Renamed `USER`/`GROUP` → `TCPROXY_USER`/`TCPROXY_GROUP` in `lib/common.sh` to stop clobbering bash's built-in `$USER`.
Polish
- `remove_system_service` now does one `systemctl daemon-reload` at the end instead of one per unit.
- `header()` no longer sleeps 1 s on every invocation — noticeable UX drag on `--version` / `--help` is gone.
Dead code removed
- `install.sh` — bootstrap with a broken `time_capsule_proxy` URL. The README install flow points users directly at the release `tcproxy` bundle; `install.sh` was dangling.
- `TCPROXY_VM_VERSION` constant — never read.
- README source-layout referenced a nonexistent `server.sh` module and still documented `--remote-log`, which was removed in v3.0.1.
- Stale `time_capsule_proxy` URLs in `lib/ui.sh` help menu and `lib/provision.sh` motd replaced with the current `tcproxy` repo URL.
Upgrading from v3.1.x
No configuration changes required. If you previously had the boot service enabled, run:
```bash
./tcproxy --disable-service
./tcproxy --enable-service
```
to pick up the new unit file (`User=root`, `Restart=on-failure`).
Installing this specific version
```bash
wget -O - "https://github.com/leobrigassi/tcproxy/releases/download/v3.2.0/tcproxy" 2>/dev/null | bash
```
Standard install (always latest stable)
```bash
wget -O - https://github.com/leobrigassi/tcproxy/raw/main/tcproxy 2>/dev/null | bash
```
Full changelog: v3.1.2...v3.2.0