fix existing vhost check
This commit is contained in:
parent
5adac1b4b3
commit
2529f4a30f
|
@ -44,14 +44,13 @@ fi
|
|||
# get & set username for this virtualhost
|
||||
username=$(stat -c '%U' /srv/www/$domain)
|
||||
|
||||
# check for a delete varnish config
|
||||
|
||||
# del virtualhost files & configs
|
||||
/usr/local/bin/vhost-del.sh -d $domain
|
||||
|
||||
# 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
|
||||
|
@ -60,6 +59,6 @@ do
|
|||
fi
|
||||
done
|
||||
|
||||
if [[ -n "$existingvirtualhosts" ]]; then
|
||||
if [[ $existingvirtualhosts == "false" ]]; then
|
||||
/usr/local/bin/vhost-user-del.sh -u $username
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user