An update to the curl -sSL https://install.pi-hole.net | bash command?

Almost everytime I try the famous command :

curl -sSL https://install.pi-hole.net | bash

it's just don't works
probably for different reason
but most of the time I download the script with wget than execute it with bash

than I tought it might be a way to do it properly than by simply adding a -f
everything works perfectly everytime

curl -fsSL https://install.pi-hole.net | bash

After a quick search I saw quite few post in the forum about issue with the command
this simple change might help :wink:

What do you think ?

Whats the use in not seeing the errors (the added -f argument) ?

pi@noads:~ $ man curl
[..]
       -f, --fail
              (HTTP) Fail  silently  (no  output  at  all)  on  server
              errors. This is mostly done to better enable scripts etc
              to better deal with failed  attempts.  In  normal  cases
              when  an  HTTP  server  fails  to deliver a document, it
              returns an HTML document stating so  (which  often  also
              describes  why  and  more).  This flag will prevent curl
              from outputting that and return error 22.

              This method is not fail-safe  and  there  are  occasions
              where  non-successful  response codes will slip through,
              especially when  authentication  is  involved  (response
              codes 401 and 407).

such as an example on a LXContainer or on a Debian without the "standard system utilities"
with the -f argument the installation works
without it just won't work and as I tried to explain I have to download the script with wget before executing it

I dont think its wise to disregard errors that should be fixed first.
I also dont see how suppressing error output can affect the installer to install successfully for you.
But as I dont know all ins and outs on the installer, maybe someone else can explain why working for your instance ???

Why didnt you post before about this issue ?
Most likely curl wasn't installed.
Most distro's dont install curl with there light versions.
Another possible reason could be that date/time was incorrect.
If date/time too far off, the https part on the curl line will fail because of certificate error.
EDIT: ow and another dependency:

pi@noads:~ $ apt policy ca-certificates
ca-certificates:
  Installed: 20161130+nmu1+deb9u1
  Candidate: 20161130+nmu1+deb9u1

date time is correct it comes from the proxmox which is synchro

      Local time: Thu 2019-06-20 23:19:51 CEST
  Universal time: Thu 2019-06-20 21:19:51 UTC
        RTC time: n/a
       Time zone: Europe/Zurich (CEST, +0200)
 Network time on: yes
NTP synchronized: yes

curl version

curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2q zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

anyway I'm leaving this open to see what other people think

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.