Split the monolithic init-caddy.sh into four ordered, idempotent
setup scripts for the Caddy deployment environment:
- install-base-deps: install required apt packages
- install-aws-cli: bootstrap AWS CLI v2
- install-caddy: fetch binary, create caddy:caddy, register systemd unit
- prepare-caddy-cicd: create bot deploy user + SSH, hand over web root
with ACLs, write site Caddyfile and start the service
- Make the web root overridable via WEB_ROOT (default /var/www)
- Install base dependencies and aws-cli for S3 downloads
- Create caddy and bot system users with dedicated homes
- Configure web root with SGID and POSIX ACL inheritance
- Generate Caddyfile config and a sample index page
- Enable and start Caddy via systemd
- Add Windows PowerShell installer with SHA256 verification and PATH setup
- Add macOS installer with arch detection and quarantine removal
- Enhance Linux installer with amd64/arm64 architecture detection
- Rename macOS migrate_remote.sh to migrate-remote.sh
- Download and verify tosutil binary via SHA256 checksum
- Install to /usr/local/bin with root:root 755 permissions
- Add post-installation instructions utilising environment variables
- Include reference link to official Volcengine documentation