cangku/remote-access/server/docker-entrypoint.sh

14 lines
329 B
Bash

#!/bin/sh
set -eu
umask 077
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