From 3085af9c31cbc9c8597256a8dba9baecf6e5ad28 Mon Sep 17 00:00:00 2001 From: Daniel Hansson Date: Sun, 25 Oct 2020 14:04:53 +0100 Subject: [PATCH] always generate nginx configs --- wordpress_install.sh | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/wordpress_install.sh b/wordpress_install.sh index 707e346..3b0ac3b 100644 --- a/wordpress_install.sh +++ b/wordpress_install.sh @@ -717,11 +717,9 @@ sleep 1 fi # Generate $NGINX_CONF -if [ -f $NGINX_CONF ]; - then - rm $NGINX_CONF - touch $NGINX_CONF - cat << NGINX_CREATE > $NGINX_CONF +rm -f $NGINX_CONF +touch $NGINX_CONF +cat << NGINX_CREATE > $NGINX_CONF user www-data; worker_processes 2; pid /run/nginx.pid; @@ -819,15 +817,12 @@ http { NGINX_CREATE print_text_in_color "$IGreen" "$NGINX_CONF was successfully created" sleep 1 -fi -# Generate $NGINX_CONF -if [ -f "$NGINX_DEF" ]; -then - rm -f $NGINX_DEF - rm -f "$SITES_ENABLED"/default - touch $NGINX_DEF - cat << NGINX_DEFAULT > "$NGINX_DEF" +# Generate $NGINX_DEF +rm -f $NGINX_DEF +rm -f "$SITES_ENABLED"/default +touch $NGINX_DEF +cat << NGINX_DEFAULT > "$NGINX_DEF" ## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. @@ -887,7 +882,6 @@ server { NGINX_DEFAULT print_text_in_color "$IGreen" "$NGINX_DEF was successfully created" sleep 1 -fi # Enable new config ln -s "$NGINX_DEF" "$SITES_ENABLED"/default