Browse Source

vhost minor improvement and todo

Bachir Soussi Chiadmi 5 years ago
parent
commit
01384e7918
1 changed files with 2 additions and 1 deletions
  1. 2 1
      bin/vhost.sh

+ 2 - 1
bin/vhost.sh

@@ -63,6 +63,7 @@ if [ "$vh" = "y" ]; then
   if [ "$_letsencrypt" = "yes" ]; then
     apt-get --yes --force-yes install certbot
     certbot certonly --standalone -d "$_domain" --cert-name "$_domain"
+    # TODO stop the whole process if letsencrypt faile
     mkdir -p /etc/nginx/ssl/certs/"$_domain"
     openssl dhparam -out /etc/nginx/ssl/certs/"$_domain"/dhparam.pem 2048
     # renewing
@@ -107,7 +108,7 @@ if [ "$vh" = "y" ]; then
   echo -n "Should we install a shortcut for a user? [Y|n] "
   read yn
   yn=${yn:-y}
-  if [ "$yn" = "y" ]; then
+  if [ "$yn" = "Y" ] || [ "$yn" = "y" ]; then
     # if $user var does not exists (vhost.sh ran directly) ask for it
     if [ -z ${user+x} ]; then
       while [ "$user" = "" ]