From 800d7e25a3e9bb0f76133148495a670a201ac905 Mon Sep 17 00:00:00 2001 From: Christoph Date: Thu, 25 Apr 2019 13:57:43 +0200 Subject: [PATCH] Add file 'ovpn_pass' to configuration directory. Chane name of configuration file for usage by network-manager-openvpn. --- create_key_config.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/create_key_config.sh b/create_key_config.sh index cbba5e2..e79d154 100755 --- a/create_key_config.sh +++ b/create_key_config.sh @@ -597,7 +597,7 @@ cp -a "${OPENVPN_BASE_DIR}/keys/${NEW_KEY_NAME}.key" "${target_dir}/${KEY_CN}-${ if [[ $? -ne 0 ]] ; then _failed=true fi -cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/${OPENVPN_NAME^^} ${NEW_KEY_NAME}.conf" +cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/$(trim ${KEY_NAME/VPN/}) ${NEW_KEY_NAME}.conf" if [[ $? -ne 0 ]] ; then _failed=true fi @@ -629,6 +629,10 @@ EOF if [[ $? -ne 0 ]] ; then _failed=true fi +echo "${KEY_PW}" > "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/ovpn_pass" +if [[ $? -ne 0 ]] ; then + _failed=true +fi chown -R ${user_name}:$user_name "${_home_dir}/VPN" >> $log_file 2>&1 if [[ $? -ne 0 ]] ; then _failed=true