From 2689abdff359a4e69644acbd492dc22c7c7efcf6 Mon Sep 17 00:00:00 2001 From: Geoff Cox Date: Sat, 22 Jul 2017 10:03:54 -0700 Subject: [PATCH] fix(add-client): adapt paths for production --- add-client.sh | 4 ++-- generate-client-certificate.sh | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/add-client.sh b/add-client.sh index 800cbd9..9c163b6 100755 --- a/add-client.sh +++ b/add-client.sh @@ -12,7 +12,7 @@ if [ "$name" = "" ]; then fi # Generate a client certificate and key pair -./generate-client-certificate.sh $name +$sd/generate-client-certificate.sh $name # Make config -./make-config.sh $name +$sd/make-config.sh $name diff --git a/generate-client-certificate.sh b/generate-client-certificate.sh index aaf4284..6c94904 100755 --- a/generate-client-certificate.sh +++ b/generate-client-certificate.sh @@ -1,5 +1,9 @@ #!/usr/bin/env bash +# Change to script directory +sd=`dirname $0` +cd $sd + name=$1 if [ "$name" = "" ]; then @@ -9,4 +13,4 @@ fi cd ~/openvpn-ca source vars -/vagrant/build-key.sh $name +$sd/build-key.sh $name