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