Add base wireguard config + nginx config

This commit is contained in:
Muaz Ahmad 2023-09-06 14:13:14 +05:00
parent 553a1b15cc
commit 198ae322c4
2 changed files with 12 additions and 3 deletions

View file

@ -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)

View 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