Page 1 of 1

Backup error

Posted: Thu Feb 16, 2017 10:55 am
by robindirksen
The backup isn't getting the data from the folder /home/*user*/web/*domain.tld*/*. The error is:

Code: Select all

/usr/local/vesta/func/domain.sh: line 238: 3
40: syntax error in expression (error token is "40")

Code: Select all

# Get config top and bottom line number
get_web_config_lines() {
    tpl_lines=$(egrep -ni "name %domain_idn%" $1 |grep -w %domain_idn%)
    tpl_lines=$(echo "$tpl_lines" |cut -f 1 -d :)
    tpl_last_line=$(wc -l $1 |cut -f 1 -d ' ')
    if [ -z "$tpl_lines" ]; then
        check_result $E_PARSING "can't parse template $1"
    fi

    vhost_lines=$(grep -niF "name $domain_idn" $2)
    vhost_lines=$(echo "$vhost_lines" |egrep "$domain_idn($| |;)") #"
    vhost_lines=$(echo "$vhost_lines" |cut -f 1 -d :)
    if [ -z "$vhost_lines" ]; then
        check_result $E_PARSING "can't parse config $2"
    fi

    top_line=$((vhost_lines + 1 - tpl_lines))                              ##line 238
    bottom_line=$((top_line - 1 + tpl_last_line))
    multi=$(sed -n "$top_line,$bottom_line p" $2 |grep ServerAlias |wc -l)
    if [ "$multi" -ge 2 ]; then
        bottom_line=$((bottom_line + multi -1))
    fi
}
VestaCP version: 0.9.8-17.

Re: Backup error

Posted: Tue Feb 21, 2017 11:43 am
by skurudo
Try to rebuild WEB first.