From 0d9218e9fc6e944c9542de081cc1462ca8465f1f Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 14 Feb 2019 13:24:18 +0200 Subject: [PATCH] in case there is no conf --- func/domain.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/func/domain.sh b/func/domain.sh index cc66aecbc..84a7c1777 100644 --- a/func/domain.sh +++ b/func/domain.sh @@ -285,8 +285,10 @@ del_web_config() { if [[ "$2" =~ stpl$ ]]; then conf="$HOMEDIR/$user/conf/web/s$1.conf" fi - get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf - sed -i "$top_line,$bottom_line d" $conf + if [ -e "$conf" ]; then + get_web_config_lines $WEBTPL/$1/$WEB_BACKEND/$2 $conf + sed -i "$top_line,$bottom_line d" $conf + fi fi # clean-up for both config styles if there is no more domains web_domain=$(grep DOMAIN $USER_DATA/web.conf |wc -l)