diff --git a/bin/vhost-add.sh b/bin/vhost-add.sh index e480ca6..caf0589 100755 --- a/bin/vhost-add.sh +++ b/bin/vhost-add.sh @@ -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 diff --git a/bin/vhost-destroy.sh b/bin/vhost-destroy.sh index 2ec1862..e61541e 100755 --- a/bin/vhost-destroy.sh +++ b/bin/vhost-destroy.sh @@ -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 diff --git a/bin/vhost-user-jails-reset.sh b/bin/vhost-user-jails-reset.sh index 9dd8c2a..2eb68fc 100755 --- a/bin/vhost-user-jails-reset.sh +++ b/bin/vhost-user-jails-reset.sh @@ -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 diff --git a/bin/vhost-varnish-disable.sh b/bin/vhost-varnish-disable.sh index 5aee0fc..6a7be64 100755 --- a/bin/vhost-varnish-disable.sh +++ b/bin/vhost-varnish-disable.sh @@ -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 diff --git a/bin/vhost-varnish-enable.sh b/bin/vhost-varnish-enable.sh index 975b17f..a700beb 100755 --- a/bin/vhost-varnish-enable.sh +++ b/bin/vhost-varnish-enable.sh @@ -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