more alias macro fixes

This commit is contained in:
Matthew Saunders Brown 2021-10-05 13:26:12 -07:00
parent 4bba0e9cc4
commit 96a60a843e

View File

@ -90,12 +90,17 @@ fi
# set username for all VHost macros
if [[ "$macro" == *"VHost"* ]]; then
# check for vhost dir
if [[ -d "/srv/www/$domain" ]]; then
if [[ "$macro" == *"Alias"* ]]; then
vhost=$option
else
vhost=$domain
fo
if [[ -d "/srv/www/$vhost" ]]; then
# get and set $username
username=$(stat -c '%U' /srv/www/$domain)
username=$(stat -c '%U' /srv/www/$vhost)
macro_vhost_line="$macro_vhost_line $username"
else
echo "VirtualHost dir for $domain does not exist."
echo "VirtualHost dir for $vhost does not exist."
exit 1
fi
# check for and set Subdomain