tweaked existingvirtualhosts option

This commit is contained in:
Matthew Saunders Brown 2021-10-02 15:32:38 -07:00
parent 90a9d0b23c
commit 649bf372bd

View File

@ -50,7 +50,6 @@ username=$(stat -c '%U' /srv/www/$virtualhost)
# check for any remaining virtualhosts before deleting user # check for any remaining virtualhosts before deleting user
# same check is done in vhost-user-del.sh # same check is done in vhost-user-del.sh
# but doing this here avoids generating any errors # but doing this here avoids generating any errors
existingvirtualhosts=false
vhost::set-virtualhostArray vhost::set-virtualhostArray
for v in "${virtualhostArray[@]}" for v in "${virtualhostArray[@]}"
do do
@ -59,6 +58,6 @@ do
fi fi
done done
if [[ $existingvirtualhosts = false ]]; then if [ -n "$existingvirtualhosts" ]; then
/usr/local/bin/vhost-user-del.sh $username /usr/local/bin/vhost-user-del.sh $username
fi fi