Added script to gen cloud-init cfg and copy

This commit is contained in:
Muaz Ahmad 2023-09-05 13:27:28 +05:00
parent 10b98b6e34
commit c546999220

View file

@ -0,0 +1,18 @@
#!/usr/bin/bash
BASE_DIR=$(realpath "$(pwd)/$(dirname "$0")/..")
PUB_KEYS=($(ls ~/.ssh/*.pub | xargs -d '\n' -n 1 basename))
set -a
WRAPPER_SCRIPT=$(base64 $BASE_DIR/bash_scripts/ddns-acme-porkbun.sh -w 0)
DDNS_SCRIPT=$(base64 $BASE_DIR/python_scripts/ddns-porkbun.py -w 0)
read -p "VPS Username: " TARGET_USERNAME
echo $PUB_KEYS
select key_file in $PUB_KEYS
do
SSH_PUB_KEY=$(cat ~/.ssh/$key_file)
break
done
set +a
envsubst < $BASE_DIR/basic_configs/debian-hetzner-init.yaml | xclip -sel c
read -p 'Input when done'
echo -n ''| xclip -sel c