Skip to content
Snippets Groups Projects
Commit f6aa7b80 authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

DRY!

parent bbdb9b7c
No related branches found
No related tags found
No related merge requests found
......@@ -143,16 +143,7 @@ function generate_certificate () {
echo ""
cat ${TLS_FOLDER}/CSR/${arg_u}.csr
echo ""
info "You should have received a certificate."
info "Please paste your certificate now: (finish with ctrl-d)"
cat > ${TLS_FOLDER}/CSR/${arg_u}.crt
info "Concat certificate, CA and key into pem file."
cat ${TLS_FOLDER}/CSR/${arg_u}.crt /data/indiehosters/certs/sub.class2.server.sha2.ca.pem /data/indiehosters/certs/ca-sha2.pem ${TLS_FOLDER}/CSR/${arg_u}.key > ${TLS_FOLDER}/${arg_u}.pem
/data/indiehosters/utils/append_crt_list.sh ${arg_u}
paste_certificate
}
function paste_certificate () {
......@@ -164,6 +155,8 @@ function paste_certificate () {
info "Concat certificate, CA and key into pem file."
cat ${TLS_FOLDER}/CSR/${arg_u}.crt /data/indiehosters/certs/sub.class2.server.sha2.ca.pem /data/indiehosters/certs/ca-sha2.pem ${TLS_FOLDER}/CSR/${arg_u}.key > ${TLS_FOLDER}/${arg_u}.pem
/data/indiehosters/utils/append_crt_list.sh ${arg_u}
}
### Parse commandline options
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment