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.
This commit is contained in:
parent
20dc3d6ea0
commit
1aaf6a4359
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user