Pihole allow command does not match pihole -h help

Expected Behaviour:

The help given by sudo pihole allow -h was expected to match the behaviour.

sudo pihole allow -h
  Usage: pihole allow \[options\]  <domain2 ...>
  Example: 'pihole allow site.com', or 'pihole allow site1.com site2.com'
  Allow one or more exact domains

Options:
remove, delete, -d  Remove domain(s)
-q, --quiet         Make output less verbose
-h, --help          Show this help dialog
-l, --list          Display domains
--comment "text"    Add a comment to the domain. If adding multiple domains the same comment will be used for all

Actual Behaviour:

sudo pihole allow -l
  /opt/pihole/api.sh: line 25: PI_HOLE_SCRIPT_DIR: readonly variable
  Usage: pihole allow \[options\]  <domain2 ...>
  Example: 'pihole allow site.com', or 'pihole allow site1.com site2.com'
  Allow one or more exact domains

Options:
remove, delete, -d  Remove domain(s)
-q, --quiet         Make output less verbose
-h, --help          Show this help dialog
-l, --list          Display domains
--comment "text"    Add a comment to the domain. If adding multiple domains the same comment will be used for all

Debug Token:

https://tricorder.pi-hole.net/oEFF6d6t/

I believe that instead of “pihole” you should be writing “pi-hole,” but according to the above answer, what you have written is quite correct.

We are used to writing “https://” which sends your command via Secure Shell, but occasionally, usually within a script, we don't need encryption. Then we have to write “http://” as before.

Are you sure you are responding to the intended topic?

1 Like

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