Commit graph

2 commits

Author SHA1 Message Date
19b3e5035c fix: skip binary download if already installed, symlink from existing path
Resolves bootstrapping deadlock where downloading sslocal requires internet
access via the very proxy being deployed. Also handles distros (Arch) where
shadowsocks-rust is installed via package manager to /usr/bin instead of
/usr/local/bin.

Priority:
  1. /usr/local/bin/sslocal exists → skip download
  2. sslocal found in PATH elsewhere → symlink to /usr/local/bin/sslocal
  3. not found → download from GitHub releases

Same logic applied to ssserver-rust in server/deploy.sh.
Also: stop conflicting shadowsocks.service before starting shadowsocks-client,
and detect pacman vs apt for privoxy install.
2026-02-28 01:55:47 +08:00
f82cd2d956 feat: add infra service deploy scripts
Add services/ directory with deploy scripts for system-level infrastructure
services. Each script reads INFRA_DIR pointing to the corresponding infra
module, sources its .env, substitutes config templates via envsubst, and
installs/enables systemd services. Zero hardcoded values — public-safe.

New scripts:
- services/email/deploy.sh      (Postfix + Dovecot + OpenDKIM + SpamAssassin)
- services/nginx/deploy.sh      (Nginx vhosts via envsubst)
- services/shadowsocks/server/deploy.sh  (shadowsocks-rust server)
- services/shadowsocks/client/deploy.sh  (sslocal + privoxy chain)
- services/frp/server/deploy.sh (frps)
- services/frp/client/deploy.sh (frpc)

README: add "Relationship with infra" section explaining the two-repo workflow
Makefile: add deploy-email, deploy-nginx, deploy-ss-{server,client},
          deploy-frp-{server,client} targets

Closes #6
2026-02-28 01:09:36 +08:00