Newer
Older
name: init-scripts
data:
init_script.sh: |
#!/bin/bash
host_keys_secret_dir="/ssh_host_keys_secret"
host_keys_dir="/ssh_host_keys"
user_keys_secret_dir="/ssh_user_keys_secret"
user_keys_dir="/ssh_user_keys"
if find $host_keys_secret_dir -mindepth 1 -maxdepth 1 | read; then
cp $host_keys_secret_dir/* $host_keys_dir
chmod 600 $host_keys_dir/*
fi
if find "$user_keys_secret_dir" -mindepth 1 -maxdepth 1 | read; then
cp $user_keys_secret_dir/* $user_keys_dir
fi