From 7edab27e53fbe005c542d996bb40a2a54505f5fb Mon Sep 17 00:00:00 2001 From: Ludovic Rousseau <ludovic.rousseau@free.fr> Date: Fri, 13 Apr 2018 12:19:55 +0200 Subject: [PATCH] Stylistic change to use an explicit if/then/fi Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr> --- advanced/Scripts/piholeLogFlush.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/advanced/Scripts/piholeLogFlush.sh b/advanced/Scripts/piholeLogFlush.sh index be2ca20d..44af77a6 100755 --- a/advanced/Scripts/piholeLogFlush.sh +++ b/advanced/Scripts/piholeLogFlush.sh @@ -17,7 +17,9 @@ source ${colfile} # a) the setting is not present in the config file, or # b) the setting is commented out (e.g. "#DBFILE=...") FTLconf="/etc/pihole/pihole-FTL.conf" -[ -e "$FTLconf" ] && DBFILE="$(sed -n -e 's/^\s*DBFILE\s*=\s*//p' ${FTLconf})" +if [ -e "$FTLconf" ]; then + DBFILE="$(sed -n -e 's/^\s*DBFILE\s*=\s*//p' ${FTLconf})" +fi # Test for empty string. Use standard path in this case. if [ -z "$DBFILE" ]; then DBFILE="/etc/pihole/pihole-FTL.db"