-# Customise ReportTitle
-temp=`pget $CONF ReportTitle |tail -n 1|perl -pe 's/(ReportTitle\s+?)(.*$)/$2/'`
-if [ "$temp" = "$oldreporttitle" ]; then
- pset $CONF ReportTitle "$reporttitle"
- db_set webalizer/doc_title "$reporttitle" || true
+ # Check for OutputDir
+ temp=`awk 'tolower($1) == "outputdir" { print $2; }' $WCONF | tail -n 1`
+ if [ "$temp" != "$WDIR" ]; then
+ cp_echo "CN: Found custom OutputDir value: $temp"
+ db_set webalizer/directory "$temp" || true
+ customized=1
+ fi
+
+ # Check for ReportTitle
+ temp=`awk 'tolower($1) == "reporttitle" { for(i=2; i<NF; i++) \
+ printf("%s ", tolower($i)); print tolower($(NF)) }' $WCONF | tail -n 1`
+ if [ "$temp" = "$oldreporttitle" ]; then
+ temp_re="^[[:space:]]*ReportTitle[[:space:]]*${oldreporttitle}$"
+ cp_check_and_sed "." \
+ "s/$temp_re/ReportTitle ${reporttitle}/I" \
+ "$WCONF" || true
+ db_set webalizer/doc_title "$reporttitle" || true
+ need_restart=1
+ fi
+else
+ cp_echo "CN: Configuration file $WCONF is missing."
+ customized=1