DON'T delete vhost file when deleting a non-vhost-based domaine-type sub_domain. fixes #138

This commit is contained in:
Benjamin Sonntag 2017-08-14 10:09:14 +02:00
parent 4bc4626d14
commit 57b0402875
1 changed files with 9 additions and 5 deletions

View File

@ -209,10 +209,14 @@ host_delete() {
return $?
fi
local FENABLED=$(host_conffile "$FQDN")
local FDISABLED="$FENABLED-disabled"
[ -w "$FENABLED" ] && rm -f "$FENABLED"
[ -w "$FDISABLED" ] && rm -f "$FDISABLED"
# Fix of a longstanding BUG: we only DELETE the vhost file if the type is a vhost one !
if [ -f "/etc/alternc/templates/${VTYPE}.conf" ]
then
local FENABLED=$(host_conffile "$FQDN")
local FDISABLED="$FENABLED-disabled"
[ -w "$FENABLED" ] && rm -f "$FENABLED"
[ -w "$FDISABLED" ] && rm -f "$FDISABLED"
fi
}