mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Fix regex to find DBFILE= from configuration file
The regex ^\s^.DBFILE\s*=\s* does not work to match "DBFILE=" I don't know what the second '^' is used for. With the change I now have the results: DBFILE=/foo/bar -> /foo/bar DBFILE=/foo/bar -> /foo/bar # DBFILE=/foo/bar -> /etc/pihole/pihole-FTL.db xDBFILE=/foo/bar -> /etc/pihole/pihole-FTL.db Signed-off-by: Ludovic Rousseau <ludovic.rousseau@free.fr>
This commit is contained in:
parent
c2fcbbb0c6
commit
3b229489c2
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ 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)"
|
||||
DBFILE="$(sed -n -e 's/^\s*DBFILE\s*=\s*//p' /etc/pihole/pihole-FTL.conf)"
|
||||
# Test for empty string. Use standard path in this case.
|
||||
if [ -z "$DBFILE" ]; then
|
||||
DBFILE="/etc/pihole/pihole-FTL.db"
|
||||
|
|
Loading…
Reference in a new issue