You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FYI, as of August 27, 2020, the current script 1.6.1 gives this error on a raspberry pi running raspbian buster. Pi-hole v5.1.2
pi@raspberrypi:~ $ sudo Pi-hole_SafeSearch.sh --enable [2020-08-27 14:30:01:998]: Retrieving List from Google [2020-08-27 14:30:03:287]: 191 TLDs [2020-08-27 14:30:03:297]: 382 Domains [2020-08-27 14:30:03:308]: ENABLING SAFESEARCH FOR PI-HOLE [2020-08-27 14:30:03:325]: BLOCKING OTHER BAD SITES /usr/local/bin/Pi-hole_SafeSearch.sh: line 48: syntax error near unexpected token^'
/usr/local/bin/Pi-hole_SafeSearch.sh: line 48: "(^|\.).+xxx$"'
In testing, it looks like line 192 is the one that is failing. If I comment it out, things work. silently pihole --regex "${REGEX[@]}"
For clarity, here's what the REGEX code is: REGEX=( "(^|\.).+xxx$" "(^|\.).+sexy$" "(^|\.).+webcam$" "(^|\.).+sex$" "(^|\.).+porn$" "(^|\.).+tube$" "(^|\.).+cam$" "(^|\.).+adult$" )
The log file has this in it:
`pi@raspberrypi:~ $ cat /var/log/Pi-hole_SafeSearch.sh.log
[2020-08-27 14:30:01:984]: STARTED
[2020-08-27 14:30:01:989]: ARGUMENTS: --enable
/usr/local/bin/Pi-hole_SafeSearch.sh: line 118: checkSudo: command not found
[2020-08-27 14:30:01:995]: Retrieving List from Google
[2020-08-27 14:30:03:282]: 191 TLDs
[2020-08-27 14:30:03:292]: 382 Domains
[2020-08-27 14:30:03:303]: ENABLING SAFESEARCH FOR PI-HOLE
[2020-08-27 14:30:03:320]: BLOCKING OTHER BAD SITES
[2020-08-27 14:30:04:083]: STOPPED
`
Sorry for the odd formatting, not sure why it isn't showing the code with the newline/CR.
The text was updated successfully, but these errors were encountered:
Mmm... messing with it in an effort to debug it has caused it to start working. I'm not sure why. There's another person on this blog site in the discussion section at the end with the same error. I started thinking it was a bash thing. I tried: sudo bash /usr/local/bin/Pi-hole_SafeSearch.sh -e
things started working but then it also worked running that without the bash in it. weird.
FYI, as of August 27, 2020, the current script 1.6.1 gives this error on a raspberry pi running raspbian buster. Pi-hole v5.1.2
pi@raspberrypi:~ $ sudo Pi-hole_SafeSearch.sh --enable [2020-08-27 14:30:01:998]: Retrieving List from Google [2020-08-27 14:30:03:287]: 191 TLDs [2020-08-27 14:30:03:297]: 382 Domains [2020-08-27 14:30:03:308]: ENABLING SAFESEARCH FOR PI-HOLE [2020-08-27 14:30:03:325]: BLOCKING OTHER BAD SITES /usr/local/bin/Pi-hole_SafeSearch.sh: line 48: syntax error near unexpected token
^'/usr/local/bin/Pi-hole_SafeSearch.sh: line 48:
"(^|\.).+xxx$"'
In testing, it looks like line 192 is the one that is failing. If I comment it out, things work.
silently pihole --regex "${REGEX[@]}"
For clarity, here's what the REGEX code is:
REGEX=( "(^|\.).+xxx$" "(^|\.).+sexy$" "(^|\.).+webcam$" "(^|\.).+sex$" "(^|\.).+porn$" "(^|\.).+tube$" "(^|\.).+cam$" "(^|\.).+adult$" )
The log file has this in it:
`pi@raspberrypi:~ $ cat /var/log/Pi-hole_SafeSearch.sh.log
[2020-08-27 14:30:01:984]: STARTED
[2020-08-27 14:30:01:989]: ARGUMENTS: --enable
/usr/local/bin/Pi-hole_SafeSearch.sh: line 118: checkSudo: command not found
[2020-08-27 14:30:01:995]: Retrieving List from Google
[2020-08-27 14:30:03:282]: 191 TLDs
[2020-08-27 14:30:03:292]: 382 Domains
[2020-08-27 14:30:03:303]: ENABLING SAFESEARCH FOR PI-HOLE
[2020-08-27 14:30:03:320]: BLOCKING OTHER BAD SITES
[2020-08-27 14:30:04:083]: STOPPED
`
Sorry for the odd formatting, not sure why it isn't showing the code with the newline/CR.
The text was updated successfully, but these errors were encountered: