Merge pull request #1329 from shtrom/plugin-freebox-url

[router/freebox] Allow to override the default base URL
This commit is contained in:
Kenyon Ralph 2023-10-26 12:26:51 -07:00 committed by GitHub
commit 15670c8e6d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 2 deletions

View File

@ -12,6 +12,15 @@ freebox - Plugin to monitor stats of a Freebox (Free.fr's custom series of route
#%# family=auto
#%# capabilities=autoconf
=head1 CONFIGURATION
At some point, the default C<mafreebox.free.fr> address stopped pointing to the
local Freebox. It is now necessary to specify the IP address or hostname of the
router. This is done as follows.
[freebox]
env.freebox_url http://192.2.0.1
=head1 CAVEAT
Only tested on a Freebox v5 with an ADSL uplink.
@ -20,7 +29,7 @@ Only tested on a Freebox v5 with an ADSL uplink.
Olivier Mehani
Copyright (C) 2019 Olivier Mehani <shtrom+munin@ssji.net>
Copyright (C) 2019,2022 Olivier Mehani <shtrom+munin@ssji.net>
=head1 LICENSE
@ -35,7 +44,10 @@ if [ "${MUNIN_DEBUG:-0}" = 1 ]; then
set -x
fi
fbx_info_url="http://mafreebox.free.fr/pub/fbx_info.txt"
FBX_URL=${freebox_url:-"http://mafreebox.free.fr"}
fbx_info_url="${FBX_URL}/pub/fbx_info.txt"
#
# Example output (including stray whitespaces):
#