-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
line 48: syntax error near unexpected token #11
Comments
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: things started working but then it also worked running that without the bash in it. weird. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: