cangku/remote-access/server/docker-entrypoint.sh
2026-09-12 16:53:18 +08:00

13 lines
319 B
Bash

#!/bin/sh
set -eu
ca_key=${BOOTSTRAP_SSH_CA_KEY:-/var/lib/cangku-bootstrap/ssh_user_ca}
if [ ! -f "$ca_key" ]; then
mkdir -p "$(dirname "$ca_key")"
ssh-keygen -q -t ed25519 -N '' -C cangku-bootstrap-user-ca -f "$ca_key"
fi
chmod 0600 "$ca_key"
chmod 0644 "$ca_key.pub"
exec python /app/bootstrap_service.py serve