diff options
-rw-r--r-- | selfpublish.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/selfpublish.sh b/selfpublish.sh index 64ccd37..f244dbd 100644 --- a/selfpublish.sh +++ b/selfpublish.sh | |||
@@ -464,7 +464,6 @@ enable_apache_modules() | |||
464 | 464 | ||
465 | site_conf_template() | 465 | site_conf_template() |
466 | { | 466 | { |
467 | HOSTNAME=$(hostname) | ||
468 | cat <<END | 467 | cat <<END |
469 | <MDomain $DOMAIN> | 468 | <MDomain $DOMAIN> |
470 | MDContactEmail webmaster@$DOMAIN | 469 | MDContactEmail webmaster@$DOMAIN |
@@ -825,13 +824,13 @@ check_tls() | |||
825 | curl -s -S -I https://"$1" >/dev/null | 824 | curl -s -S -I https://"$1" >/dev/null |
826 | } | 825 | } |
827 | 826 | ||
827 | HOSTNAME=$(hostname) | ||
828 | DEBDEST=$(realpath .) | 828 | DEBDEST=$(realpath .) |
829 | [ "$NO_EQUIVS" ] || equivocate >&2 | 829 | [ "$NO_EQUIVS" ] || equivocate >&2 |
830 | 830 | ||
831 | APACHE_MODULES='status md rewrite ssl include cgi' | 831 | APACHE_MODULES='status md rewrite ssl include cgi' |
832 | APACHE_SITE_DIRS='logs public_html' | 832 | APACHE_SITE_DIRS='logs public_html' |
833 | 833 | ||
834 | |||
835 | AUTH_TYPE=${1:-$DEFAULT_AUTH_TYPE} | 834 | AUTH_TYPE=${1:-$DEFAULT_AUTH_TYPE} |
836 | AUTH_KEYTAG=$(path_fragment_to_ssh_keytag "$AUTH_TYPE") | 835 | AUTH_KEYTAG=$(path_fragment_to_ssh_keytag "$AUTH_TYPE") |
837 | DYNDNS=$(get_dyndns_domain "$AUTH_KEYTAG") | 836 | DYNDNS=$(get_dyndns_domain "$AUTH_KEYTAG") |
@@ -847,7 +846,7 @@ case "$DOMAIN" in | |||
847 | exit 1 ;; | 846 | exit 1 ;; |
848 | esac | 847 | esac |
849 | 848 | ||
850 | check_tls "$DOMAIN" | 849 | check_tls "$HOSTNAME.$DOMAIN" |
851 | tls_result=$? | 850 | tls_result=$? |
852 | 851 | ||
853 | install_apache_vhost | 852 | install_apache_vhost |
@@ -862,6 +861,6 @@ else | |||
862 | systemctl reload apache2 || systemctl restart apache2 | 861 | systemctl reload apache2 || systemctl restart apache2 |
863 | fi | 862 | fi |
864 | 863 | ||
865 | check_tls "$DOMAIN" | 864 | check_tls "$HOSTNAME.$DOMAIN" |
866 | printf '%s\n' "https://$DOMAIN/selfpublish.sh" | 865 | printf '%s\n' "https://$HOSTNAME.$DOMAIN/selfpublish.sh" |
867 | 866 | ||