openvpn.sh: Save servername used during init

* Save the DNS domain name or IP address the server was configured with
* Useful for generating client configurations
This commit is contained in:
Kyle Manna 2014-06-04 09:08:09 -07:00
parent a1c174f6f5
commit f673ee83ce

View File

@ -52,6 +52,8 @@ do_init() {
[ -n "$ptr" ] && cn=$ptr || cn=$ip4
fi
echo "$cn" > $OPENVPN/servername
easyrsa build-server-full $cn nopass
[ -f "$OPENVPN/udp1194.conf" ] || cat > "$OPENVPN/udp1194.conf" <<EOF