Add variable 'ORG_SHORTCUT'. Change name of service output-files.

This commit is contained in:
2019-07-15 15:01:41 +02:00
parent 20f0ebddd6
commit dda55a4cf4
3 changed files with 37 additions and 16 deletions

View File

@@ -597,14 +597,18 @@ 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}/$(trim ${KEY_NAME/VPN/}) ${NEW_KEY_NAME}.conf"
if [[ $? -ne 0 ]] ; then
_failed=true
fi
cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/client-$(basename $_client_conf_file)"
if [[ -n "$ORG_SHORTCUT" ]]; then
cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/client-${ORG_SHORTCUT}-${NEW_KEY_NAME}.conf"
else
cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/client-${KEY_CN/VPN-/}-${NEW_KEY_NAME}.conf"
fi
if [[ $? -ne 0 ]] ; then
_failed=true
fi
#cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/client-$(basename $_client_conf_file)"
#if [[ $? -ne 0 ]] ; then
# _failed=true
#fi
cp -a "$_client_conf_file" "${target_dir}/${KEY_CN}-${NEW_KEY_NAME}/${KEY_CN}-${NEW_KEY_NAME}.ovpn"
if [[ $? -ne 0 ]] ; then
_failed=true