jpgpi250 / piholemanual

files referred to in my pihole installation manual
115 stars 14 forks source link

Error running NextDNS.sh #1

Closed aNerdgirl closed 4 years ago

aNerdgirl commented 4 years ago

Hi. Thanks for the script. I copied it over (downloaded it from you). But when I run

$ sh /usr/local/bin/NextDNS.sh or $ sudo sh ./usr/local/bin/NextDNS.sh

I get always the same error as mentioned above:

--2020-05-16 19:21:57--  https://raw.githubusercontent.com/nextdns/cname-cloaking-blocklist/master/domains
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.36.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.36.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1011 [text/plain]
Saving to: ‘/home/pi/domains’

/home/pi/domains             100%[=============================================>]    1011  --.-KB/s    in 0s

2020-05-16 19:21:57 (6.85 MB/s) - ‘/home/pi/domains’ saved [1011/1011]

./usr/local/bin/NextDNS.sh: 11: ./usr/local/bin/NextDNS.sh: Syntax error: "(" unexpected (expecting "fi")

Any idea why? Thank you in advance!

jpgpi250 commented 4 years ago

script has been made and en tested on Raspbian.

download the script: sudo wget https://raw.githubusercontent.com/jpgpi250/piholemanual/master/NextDNS.sh -O /home/pi/NextDNS.sh execute the script: chmod +x /home/pi/NextDNS.sh sudo /home/pi/NextDNS.sh

I run the script weekly, using cron, to add possible new entries from nextDNS.

aNerdgirl commented 4 years ago

I forgot to use chmod to make it executable. Thank you so much!