Made "-h" actually work

This commit is contained in:
Daniel Ziltener 2020-03-05 15:41:57 +01:00
parent 34791d5abf
commit 194b088037
1 changed files with 17 additions and 12 deletions

View File

@ -177,7 +177,8 @@
{:type "MX" :name company-name :content "mx.yandex.net."}
{:type "MX" :name (format "m.%s.talent.careers" company-name) :content "feedback-smtp.eu-west-1.amazonses.com"}
{:type "TXT" :name (format "m.%s.talent.careers" company-name) :content "v=spf1 include:amazonses.com ~all"}
{:type "TXT" :name (format "%s.talent.careers" company-name) :content "v=spf1 redirect=_spf.yandex.net"}])
{:type "TXT" :name (format "%s.talent.careers" company-name) :content "v=spf1 redirect=_spf.yandex.net"}
{:type "TXT" :name (format "_dmarc.%s" company-name) :content "v=DMARC1; p=none; rua=sompani-d@dmarc.report-uri.com"}])
(defn make-dns-entries! [entries]
(let [uri "https://api.cloudflare.com/client/v4/zones/5cd643e7432d7cf69f44e268e32b5452/dns_records"
@ -216,17 +217,21 @@
base-dns
aws-domain
nginx
certify]
certify
help]
:as options}
(:options (parse-opts args cli-options))
datamap {:company-name vc-name :company-domain vc-domain}]
(and deploy-directories (make-dirs! datamap))
(and base-dns (make-basic-dns-entries! datamap))
(and aws-domain (do (reset! driver (FirefoxDriver.))
(aws-login)
(Thread/sleep 5000)
(aws-verify-domain-dns datamap)
(aws-verify-domain-mailfrom datamap)))
(and nginx (create-nginx-server! datamap))
(and certify (generate-certs! datamap))
(println "Done.")))
(if help
(println (:summary (parse-opts args cli-options)))
(do
(and deploy-directories (make-dirs! datamap))
(and base-dns (make-basic-dns-entries! datamap))
(and aws-domain (do (reset! driver (FirefoxDriver.))
(aws-login)
(Thread/sleep 5000)
(aws-verify-domain-dns datamap)
(aws-verify-domain-mailfrom datamap)))
(and nginx (create-nginx-server! datamap))
(and certify (generate-certs! datamap))
(println "Done.")))))