1
0
Fork 0
mirror of synced 2024-06-17 06:41:09 -04:00
ovpn-admin/reconfigure.sh
2024-01-02 02:58:13 +04:00

16 lines
323 B
Bash
Executable file

#!/usr/bin/env bash
set -eo pipefail
if [ ! -f .env ]; then
echo "Please create a .env file"
exit 1
fi
set -a
source .env
set +a
echo -e "$OVPN_NGINX_HTPASSWD\n" > ./nginx/.htpasswd
envsubst < ./nginx/default.conf.tpl > ./nginx/default.conf
envsubst < ./ovpn_config/openvpn.conf.tpl > ./ovpn_config/openvpn.conf