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"