3 # First argument: Client identifier
6 echo "Please provide the client identifier."
7 echo " example: $0 <USER_NAME>.<ZONE_NAME>"
8 echo " example: $0 jsmith.onap"
12 KEY_DIR="/root/openvpn-ca/client_configs/keys"
13 OUTPUT_DIR="/root/openvpn-ca/client_configs/files"
14 BASE_CONFIG="/root/openvpn-ca/client_configs/base.conf"
19 <(echo -e '</ca>\n<cert>') \
20 ${KEY_DIR}/"${1}".crt \
21 <(echo -e '</cert>\n<key>') \
22 ${KEY_DIR}/"${1}".key \
23 <(echo -e '</key>\n<tls-auth>') \
25 <(echo -e '</tls-auth>') \
26 > ${OUTPUT_DIR}/"${1}".ovpn