Skip to content
Snippets Groups Projects
Commit aa1d78b9 authored by Your Name's avatar Your Name
Browse files

Merge branch 'master' of https://github.com/IndiePaaS/IndiePaaS

parents 18f54ee8 d2c621d6
No related branches found
No related tags found
No related merge requests found
...@@ -33,6 +33,7 @@ read -r -d '' usage <<-'EOF' ...@@ -33,6 +33,7 @@ read -r -d '' usage <<-'EOF'
-u [arg] URL to process. Required. -u [arg] URL to process. Required.
-f [arg] Certificate file to use. -f [arg] Certificate file to use.
-g Generates the necessary certificate. -g Generates the necessary certificate.
-p Paste certificate from previous run.
-b Buys the associated domain name. -b Buys the associated domain name.
-c Configures DNS on Namecheap. -c Configures DNS on Namecheap.
-d Enables debug mode -d Enables debug mode
...@@ -234,6 +235,17 @@ function generate_certificate () { ...@@ -234,6 +235,17 @@ function generate_certificate () {
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 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
} }
function paste_certificate () {
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
}
function configure_dns () { function configure_dns () {
info "Configuring DNS." info "Configuring DNS."
arguments="&Command=namecheap.domains.dns.setHosts\ arguments="&Command=namecheap.domains.dns.setHosts\
...@@ -406,6 +418,7 @@ TLS_FOLDER=${FOLDER}/TLS ...@@ -406,6 +418,7 @@ TLS_FOLDER=${FOLDER}/TLS
[ ${arg_b} -eq 1 ] && buy_domain_name [ ${arg_b} -eq 1 ] && buy_domain_name
scaffold scaffold
[ ${arg_g} -eq 1 ] && generate_certificate [ ${arg_g} -eq 1 ] && generate_certificate
[ ${arg_p} -eq 1 ] && paste_certificate
[ ! -z "${arg_f}" ] && provision_certificate [ ! -z "${arg_f}" ] && provision_certificate
[ ${arg_c} -eq 1 ] && configure_dns [ ${arg_c} -eq 1 ] && configure_dns
[ ${arg_s} -eq 1 ] && start_application [ ${arg_s} -eq 1 ] && start_application
......
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