Specify vpn endpoint in the config file

This commit is contained in:
Pagan Gazzard 2015-08-28 15:06:27 +01:00 committed by Pablo Carranza Vélez
parent c250ff483c
commit 177e9ddd7c
3 changed files with 4 additions and 1 deletions

View File

@ -6,6 +6,7 @@ PUBNUB_PUBLISH_KEY=pub-c-bananas
MIXPANEL_TOKEN=bananasbananas
LISTEN_PORT=48484
RESIN_SUPERVISOR_SECRET=bananas
VPN_ENDPOINT=vpn.resinstaging.io
SUPERVISOR_IMAGE=
LED_FILE=/dev/null

View File

@ -1,5 +1,5 @@
client
remote vpn.resinstaging.io 443
remote #{VPN_ENDPOINT} 443
resolv-retry infinite
remote-cert-tls server

View File

@ -1,4 +1,6 @@
#!/bin/bash
sed --expression="s/#{VPN_ENDPOINT}/${VPN_ENDPOINT}/" /etc/openvpn/client.conf.tmpl > /etc/openvpn/client.conf
while true; do
if [ `jq ".uuid | length" $CONFIG_PATH` -eq 0 ]; then
echo "UUID missing from config file, VPN cannot connect"