From 8b5dcc3872de9a77833d2ed680cfac525350574c Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 13 Apr 2018 16:53:57 +0100 Subject: [PATCH] Match change made by 7edab27 to prevent merge conflict Signed-off-by: Adam Warner --- advanced/Scripts/piholeLogFlush.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/advanced/Scripts/piholeLogFlush.sh b/advanced/Scripts/piholeLogFlush.sh index 0bc998ac..d9ac5ebd 100755 --- a/advanced/Scripts/piholeLogFlush.sh +++ b/advanced/Scripts/piholeLogFlush.sh @@ -16,12 +16,10 @@ source ${colfile} # Constructed to return nothing when # a) the setting is not present in the config file, or # b) the setting is commented out (e.g. "#DBFILE=...") -DBFILE="$(sed -n -e 's/^\s^.DBFILE\s*=\s*//p' /etc/pihole/pihole-FTL.conf 2> /dev/null)" -# Test for empty string. Use standard path in this case. -if [ -z "$DBFILE" ]; then - DBFILE="/etc/pihole/pihole-FTL.db" +FTLconf="/etc/pihole/pihole-FTL.conf" +if [ -e "$FTLconf" ]; then + DBFILE="$(sed -n -e 's/^\s*DBFILE\s*=\s*//p' ${FTLconf})" fi - if [[ "$@" != *"quiet"* ]]; then echo -ne " ${INFO} Flushing /var/log/pihole.log ..." fi