more vhost script call fixes for getopts

This commit is contained in:
Matthew Saunders Brown 2021-10-05 14:03:01 -07:00
parent 2feb3af39d
commit da12c7e1ea
5 changed files with 10 additions and 10 deletions

View File

@ -95,4 +95,4 @@ if [[ ! -f /etc/php/$phpVersion/fpm/pool.d/$username.conf ]]; then
fi
# create & enable apache config
/usr/local/bin/vhost-enable.sh VHostHTTP $domain
/usr/local/bin/vhost-enable.sh -d $domain -m VHostHTTP

View File

@ -37,7 +37,7 @@ fi
database=${domain//./dot}
database=${database//-/dash}
if [[ -d /var/lib/mysql/$database ]]; then
/usr/local/bin/vhost-mysql-db-del.sh $domain
/usr/local/bin/vhost-mysql-db-del.sh -d $domain
fi
# get & set username for this virtualhost
@ -46,7 +46,7 @@ username=$(stat -c '%U' /srv/www/$domain)
# check for a delete varnish config
# del virtualhost files & configs
/usr/local/bin/vhost-del.sh $domain
/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
@ -60,5 +60,5 @@ do
done
if [[ -n "$existingvirtualhosts" ]]; then
/usr/local/bin/vhost-user-del.sh $username
/usr/local/bin/vhost-user-del.sh -u $username
fi

View File

@ -49,5 +49,5 @@ jails=(*)
for jail in "${!jails[@]}"
do
jail=${jails[$jail]}
echo /usr/local/bin/vhost-user-jail-reset.sh $jail
echo /usr/local/bin/vhost-user-jail-reset.sh -u $jail
done

View File

@ -42,7 +42,7 @@ fi
if [[ $macro_name =~ ^.*Varnish$ ]]; then
# set new macro_name
macro_name=`echo $macro_name | sed -e 's|Varnish$||'`
vhost_enable="$macro_name $domain"
vhost_enable="-d $domain -m $macro_name"
else
echo "Varnish is not enabled for $domain"
exit 1
@ -51,7 +51,7 @@ fi
# check if VHost macro is for a Subdomain or Alias
if [[ "$macro_name" == *"Subdomain"* ]] || [[ "$macro_name" == *"Alias"* ]]; then
macro_var=`echo "$macro_vhost_line" | awk '{print $5}'`
vhost_enable="$vhost_enable $macro_var"
vhost_enable="$vhost_enable -o $macro_var"
fi
/usr/local/bin/vhost-enable.sh $vhost_enable

View File

@ -60,7 +60,7 @@ fi
# check for valid HTTPS VHost macro
if [[ $macro_name =~ ^VHost[[:alpha:]]*HTTPS$ ]]; then
macro_name_new="${macro_name}Varnish"
vhost_enable="$macro_name_new $domain"
vhost_enable="-d $domain -m $macro_name_new"
else
echo "$domain must be enabled with an HTTPS VHost macro"
exit 1
@ -70,13 +70,13 @@ fi
if [[ "$macro_name" == *"Subdomain"* ]]; then
vhost_subdomain=`echo "$macro_vhost_line" | awk '{print $5}'`
vhost_enable=$(echo "$vhost_enable" | sed -e "s/ $vhost_subdomain\./ /")
vhost_enable="$vhost_enable $vhost_subdomain"
vhost_enable="$vhost_enable -o $vhost_subdomain"
fi
# check if VHost macro is for an Alias
if [[ "$macro_name" == *"Alias"* ]]; then
vhost_alias=`echo "$macro_vhost_line" | awk '{print $5}'`
vhost_enable="$vhost_enable $vhost_alias"
vhost_enable="$vhost_enable -o $vhost_alias"
fi
# check for ssl cert