Added script to gen cloud-init cfg and copy
This commit is contained in:
parent
10b98b6e34
commit
c546999220
1 changed files with 18 additions and 0 deletions
18
bash_scripts/cloud-init-populate.sh
Executable file
18
bash_scripts/cloud-init-populate.sh
Executable 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
|
Loading…
Reference in a new issue