From 649bf372bdea2d59f45d92ef481f28d71d7bc557 Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Sat, 2 Oct 2021 15:32:38 -0700 Subject: [PATCH] tweaked existingvirtualhosts option --- bin/vhost-destroy.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bin/vhost-destroy.sh b/bin/vhost-destroy.sh index f3921b3..2140182 100755 --- a/bin/vhost-destroy.sh +++ b/bin/vhost-destroy.sh @@ -50,7 +50,6 @@ username=$(stat -c '%U' /srv/www/$virtualhost) # check for any remaining virtualhosts before deleting user # same check is done in vhost-user-del.sh # but doing this here avoids generating any errors -existingvirtualhosts=false vhost::set-virtualhostArray for v in "${virtualhostArray[@]}" do @@ -59,6 +58,6 @@ do fi done -if [[ $existingvirtualhosts = false ]]; then +if [ -n "$existingvirtualhosts" ]; then /usr/local/bin/vhost-user-del.sh $username fi