From 1aaf6a43599927205e3c05f3a5601f638acbb9fa Mon Sep 17 00:00:00 2001 From: Kyle Manna Date: Sun, 29 Jun 2014 23:04:42 -0700 Subject: [PATCH] genconfig: Use servername if $1 not specified * Set the common name to servername set during last ovpn_init if $1 is not passed in. * Simplies re-running ovpn_genconfig when features are added. --- bin/ovpn_genconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ovpn_genconfig b/bin/ovpn_genconfig index 8a4a2f0..921c800 100755 --- a/bin/ovpn_genconfig +++ b/bin/ovpn_genconfig @@ -6,7 +6,8 @@ set -ex -cn=$1 +servername=$(cat "$OPENVPN/servername" 2> /dev/null) +cn=${1-$servername} if [ -z "$cn" ]; then echo "Common name not specified"