Deploy scripts now look for templates in INFRA_DIR first, then fall back
to the bundled copies in automa. This makes automa fully self-contained:
a .env with filled values is all that is needed — no infra checkout required.
Bundle: config.json.example, privoxy.conf.example, shadowsocks-client.service,
shadowsocks-rust.service, frps.toml.example, frps.service,
frpc.toml.example, frpc.service
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.
Discovers all deployable modules from services/ automatically.
Grouped menu by role (vps / homeserver / any) with descriptions.
Env resolution priority:
1. pre-filled .env in local infra checkout (--infra-dir)
2. .env.example from infra (interactive fill)
3. .env.example bundled in automa (interactive fill, no infra needed)
Usage:
./setup.sh # fully interactive
./setup.sh --infra-dir /path/to/infra # use pre-filled .env files
./setup.sh --dry-run # preview without deploying
Also add .env.example with role/description metadata to each service
module so setup.sh can build the menu and prompt for values without
requiring an infra checkout.