diff --git a/scripts/provision.sh b/scripts/provision.sh index 785d46f74828eae35a191ecb0f6a22d43c5f8208..b604cd16b04ff3bae10b26ee8ad69d7d45ae1bf2 100755 --- a/scripts/provision.sh +++ b/scripts/provision.sh @@ -206,18 +206,9 @@ function generate_certificate () { echo "" info "You should have received a certificate." - info "Please paste your certificate now:" - IFS= read -d '' -n 1 certificate - while IFS= read -d '' -n 1 -t 2 c - do - certificate+=$c - done - - if [ "${arg_d}" = "1" ]; then - echo ${certificate} - fi + info "Please paste your certificate now: (finish with ctrl-d)" - echo ${certificate} > ${TLS_FOLDER}/CSR/${arg_u}.crt + 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/scripts/sub.class2.server.ca.pem /data/indiehosters/scripts/ca.pem ${TLS_FOLDER}/CSR/${arg_u}.key > ${TLS_FOLDER}/${arg_u}.pem