From 29c8d50b536645d81ec9624846f5e776590737af Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sat, 7 Apr 2018 13:30:19 +0200 Subject: [PATCH] stop nginx at the begin of vhost install --- bin/vhost.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/vhost.sh b/bin/vhost.sh index 1800647..c37ce2d 100755 --- a/bin/vhost.sh +++ b/bin/vhost.sh @@ -56,6 +56,8 @@ if [ "$vh" = "y" ]; then read _letsencrypt done + systemctl stop nginx + # lets'encrypt # https://certbot.eff.org/lets-encrypt/debianstretch-nginx if [ "$_letsencrypt" = "yes" ]; then @@ -138,7 +140,7 @@ if [ "$vh" = "y" ]; then ln -s /etc/nginx/sites-available/"$_domain".conf /etc/nginx/sites-enabled/"$_domain".conf # restart nginx - systemctl restart nginx + systemctl start nginx echo -e "\033[92;1mvhost $_domain configured \033[Om" else echo -e "Vhost installation aborted"