ovpn-admin/reconfigure.sh

15 lines
270 B
Bash
Raw Normal View History

2024-01-01 21:14:00 +04:00
#!/usr/bin/env bash
2024-01-01 22:00:20 +04:00
set -eo pipefail
2024-01-01 21:14:00 +04:00
if [ ! -f .env ]; then
echo "Please create a .env file"
exit 1
fi
2024-01-01 21:52:35 +04:00
set -a
2024-01-01 21:14:00 +04:00
source .env
2024-01-01 21:52:35 +04:00
set +a
2024-01-01 21:14:00 +04:00
envsubst < ./nginx/default.conf.tpl > ./nginx/default.conf
2024-01-01 22:02:28 +04:00
envsubst < ./ovpn_config/openvpn.conf.tpl > ./ovpn_config/openvpn.conf