diff options
author | Andrew Cady <d@jerkface.net> | 2020-09-15 13:32:00 -0400 |
---|---|---|
committer | Andrew Cady <d@jerkface.net> | 2020-09-15 13:32:00 -0400 |
commit | 24bbf1df3369e90ba66b37f8389d2e42bc777d26 (patch) | |
tree | 586855623d5ef87c38c6453bd62c24929109a6cb | |
parent | 83219573ed12f3ec6abe85f9481dacd1363bb008 (diff) |
eliminate duplication
-rw-r--r-- | selfpublish.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/selfpublish.sh b/selfpublish.sh index ffc7ad0..c97163f 100644 --- a/selfpublish.sh +++ b/selfpublish.sh | |||
@@ -537,17 +537,18 @@ case "$DOMAIN" in | |||
537 | exit 1 ;; | 537 | exit 1 ;; |
538 | esac | 538 | esac |
539 | 539 | ||
540 | if ! check_tls "$DOMAIN" || force | 540 | check_tls "$DOMAIN" |
541 | then | 541 | tls_result=$? |
542 | install_apache_vhost | ||
543 | configure_apache_vhost | ||
544 | 542 | ||
543 | install_apache_vhost | ||
544 | configure_apache_vhost | ||
545 | |||
546 | if [ $tls_result != 0 ] || force | ||
547 | then | ||
545 | systemctl restart apache2 | 548 | systemctl restart apache2 |
546 | wait_for_certificate_issuance "$DOMAIN" | 549 | wait_for_certificate_issuance "$DOMAIN" |
547 | systemctl reload apache2 || systemctl restart apache2 | 550 | systemctl reload apache2 || systemctl restart apache2 |
548 | else | 551 | else |
549 | install_apache_vhost | ||
550 | configure_apache_vhost | ||
551 | systemctl reload apache2 || systemctl restart apache2 | 552 | systemctl reload apache2 || systemctl restart apache2 |
552 | fi | 553 | fi |
553 | 554 | ||