Add base wireguard config + nginx config
This commit is contained in:
parent
553a1b15cc
commit
198ae322c4
2 changed files with 12 additions and 3 deletions
|
@ -5,8 +5,9 @@ PUB_KEYS=($(ls ~/.ssh/*.pub | xargs -d '\n' -n 1 basename))
|
||||||
set -a
|
set -a
|
||||||
WRAPPER_SCRIPT=$(base64 $BASE_DIR/bash_scripts/ddns-acme-porkbun.sh -w 0)
|
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)
|
DDNS_SCRIPT=$(base64 $BASE_DIR/python_scripts/ddns-porkbun.py -w 0)
|
||||||
|
WG_CONF_BASE=$(base64 $BASE_DIR/basic_configs/wg_base.conf -w 0)
|
||||||
|
NGINX_CONF=$(base64 $BASE_DIR/basic_configs/nginx-vps/nginx.conf -w 0)
|
||||||
read -p "VPS Username: " TARGET_USERNAME
|
read -p "VPS Username: " TARGET_USERNAME
|
||||||
echo $PUB_KEYS
|
|
||||||
select key_file in $PUB_KEYS
|
select key_file in $PUB_KEYS
|
||||||
do
|
do
|
||||||
SSH_PUB_KEY=$(cat ~/.ssh/$key_file)
|
SSH_PUB_KEY=$(cat ~/.ssh/$key_file)
|
||||||
|
|
|
@ -52,6 +52,14 @@ write-files:
|
||||||
owner: root:root
|
owner: root:root
|
||||||
path: /usr/local/bin/ddns-acme-porkbun.timer
|
path: /usr/local/bin/ddns-acme-porkbun.timer
|
||||||
permissions: '0644'
|
permissions: '0644'
|
||||||
|
- encoding: b64
|
||||||
|
content: ${WG_CONF_BASE}
|
||||||
|
owner: root:root
|
||||||
|
path: /etc/wireguard/wg0.conf
|
||||||
|
permissions: '0600'
|
||||||
|
- encoding: b64
|
||||||
|
content: ${NGINX_CONF}
|
||||||
|
owner: root:root
|
||||||
|
path: /etc/nginx/nginx.conf
|
||||||
|
permissions: '0644'
|
||||||
|
|
||||||
runcmd:
|
|
||||||
- reboot
|
|
||||||
|
|
Loading…
Reference in a new issue