Skip to content
Snippets Groups Projects
Commit a2d1c068 authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

add param add-or-renew

parent 2353823a
No related branches found
No related tags found
No related merge requests found
......@@ -213,6 +213,21 @@ function public_add(){
_update "added $CM_fqdn $*"
}
#
# pulic function ADD OR RENEW certificate
#
function public_add-or-renew(){
_requiresFqdn
_certExists
if [ $? -eq 0 ]; then
_wd "--- cert was found ... renew it"
public_renew
else
_wd "--- cert does mot exist ... add it"
public_add
fi
}
#
# public function to delete a cert
#
......@@ -343,12 +358,20 @@ $self ACTION [FQDN]
The ACTIONs for single certificate handlings are:
add FQDN [.. FQDN-N]
create new certificate ... or force it
add FQDN [.. FQDN-N]
create new certificate
The first FQDN is a hostname to generate the certificate for.
Following multiple hostnames will be used as DNS aliases in the
same certificate.
add-or-renew FQDN [.. FQDN-N]
This param is for automation tools like Ansible or Puppet.
It checks if the certificate for first (*) FQDN exists.
If not: add a new cert (see "add").
If so: call renew action (see "renew")
(*) it doesn't verify the DNS aliases
delete FQDN
delete a given certificate
......
......@@ -37,12 +37,20 @@ cm.sh ACTION [FQDN]
The ACTIONs for single certificate handlings are:
add FQDN [.. FQDN-N]
create new certificate ... or force it
add FQDN [.. FQDN-N]
create new certificate
The first FQDN is a hostname to generate the certificate for.
Following multiple hostnames will be used as DNS aliases in the
same certificate.
add-or-renew FQDN [.. FQDN-N]
This param is for automation tools like Ansible or Puppet.
It checks if the certificate for first (*) FQDN exists.
If not: add a new cert (see "add").
If so: call renew action (see "renew")
(*) it doesn't verify the DNS aliases
delete FQDN
delete a given certificate
......@@ -57,5 +65,4 @@ ACTIONs for all certs
list
list all certificates including creation and renew date
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment