Skip to content

Commit

Permalink
When running locally derive port from FTL itself
Browse files Browse the repository at this point in the history
Signed-off-by: Christian König <ckoenig@posteo.de>
  • Loading branch information
yubiuser committed Aug 2, 2023
1 parent 57b102c commit d734d16
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion padd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ ConstructAPI() {
# If no arguments were supplied set them to default
if [ -z "${URL}" ]; then
URL=127.0.0.1
# when no $URL is set we assume PADD is running locally and we can get the port value from FTL directly
PORT="$(pihole-FTL --config webserver.port)"
PORT="${PORT%%,*}"
fi
if [ -z "${PORT}" ]; then
PORT=80
Expand Down Expand Up @@ -1231,7 +1234,7 @@ secretRead() {
# `-n` option (reading n chars)


# This workaround changes the terminal characteristics to not echo input and later rests this option
# This workaround changes the terminal characteristics to not echo input and later resets this option
# credits https://stackoverflow.com/a/4316765
# showing astrix instead of password
# https://stackoverflow.com/a/24600839
Expand Down

0 comments on commit d734d16

Please sign in to comment.