Skip to content

Commit 78bccef

Browse files
authored
Merge pull request hestiacp#1582 from moucho/deletedomain_error
Fix on deleting last web domain was deleting all includes in /etc/*/conf.d/vesta.conf for some usernames
2 parents ed1ad94 + 04a5526 commit 78bccef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

func/domain.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ replace_web_config() {
269269
fi
270270
}
271271

272-
# Delete web configuartion
272+
# Delete web configuration
273273
del_web_config() {
274274
conf="$HOMEDIR/$user/conf/web/$domain.$1.conf"
275275
if [[ "$2" =~ stpl$ ]]; then
@@ -291,7 +291,7 @@ del_web_config() {
291291
# clean-up for both config styles if there is no more domains
292292
web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)
293293
if [ "$web_domain" -eq '0' ]; then
294-
sed -i "/.*\/$user\/.*/d" /etc/$1/conf.d/vesta.conf
294+
sed -i "/.*\/$user\/conf\/web\//d" /etc/$1/conf.d/vesta.conf
295295
if [ -f "$conf" ]; then
296296
rm -f $conf
297297
fi

0 commit comments

Comments
 (0)