From c10296648518753a70a8fad2be867b2299ff601d Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 2 Apr 2017 17:50:18 -0700 Subject: [PATCH] be less verbose --- apache-site | 19 +++++++++++-------- nginx-site | 17 +++++++++-------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/apache-site b/apache-site index 5e3f8c4..cf0aa4a 100755 --- a/apache-site +++ b/apache-site @@ -127,7 +127,8 @@ if $ssl; then fi -tee $vhost_file <$vhost_file < ServerName $h ServerAlias www.$h @@ -135,21 +136,21 @@ tee $vhost_file <>$vhost_file fi # go faster! if [[ -e /etc/apache2/mods-available/http2.load ]]; then # https://httpd.apache.org/docs/2.4/mod/mod_http2.html a2enmod http2 - tee -a $vhost_file <>$vhost_file <>$vhost_file <$redir_file <<'EOF' # vhost_combined with %D (request time in microseconds) # this file is just a convenient place to drop it. LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\" %D" vhost_time_combined @@ -176,7 +178,7 @@ RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent] EOF if ! $listen_80; then - tee -a $redir_file <<'EOF' + cat >>$redir_file <<'EOF' Listen 80 EOF fi @@ -185,6 +187,7 @@ EOF mkdir -p /etc/letsencrypt # this is from cerbot, see below. + echo "$0: creating $certbot_ssl_conf" cat >$certbot_ssl_conf <<'EOF' # Baseline setting to Include for SSL sites @@ -226,7 +229,7 @@ EOF sleep 1 fi fi -tee -a $vhost_file <>$vhost_file < @@ -234,7 +237,7 @@ EOF if ! $listen_port; then # reference: https://httpd.apache.org/docs/2.4/mod/mpm_common.html#listen - tee -a $vhost_file <>$vhost_file </dev/null; then http2_arg=http2 fi -sudo dd of=/etc/nginx/sites-enabled/$h.conf </etc/nginx/sites-enabled/$h.conf <; EOF if [[ $extra_settings ]]; then - cat $extra_settings | sudo tee -a /etc/nginx/sites-enabled/$h.conf + cat $extra_settings >>/etc/nginx/sites-enabled/$h.conf fi if [[ $proxy_port ]]; then - sudo tee -a /etc/nginx/sites-enabled/$h.conf <>/etc/nginx/sites-enabled/$h.conf <>/etc/nginx/sites-enabled/$h.conf <