mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 07:28:39 +01:00
ddns-scripts: also read providers from custom directory
The provider could also be read from the custom directory. To get always the latest version of the provider config json file, we read first the custom directory and after that we also check the default directory, if we could not find the provider file Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -317,17 +317,18 @@ urlencode() {
|
||||
}
|
||||
|
||||
# extract url or script for given DDNS Provider from
|
||||
# directory /usr/share/ddns/default
|
||||
# $1 Name of the provider
|
||||
# $1 Name of Variable to store url to
|
||||
# $2 Name of Variable to store script to
|
||||
# $3 Name of Variable to store service answer to
|
||||
# $2 Provider directory
|
||||
# $3 Name of Variable to store url to
|
||||
# $4 Name of Variable to store script to
|
||||
# $5 Name of Variable to store service answer to
|
||||
get_service_data() {
|
||||
local provider="$1"
|
||||
shift
|
||||
local dir="$1"
|
||||
shift
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
local dir="/usr/share/ddns/default"
|
||||
local name data url answer script
|
||||
|
||||
[ $# -ne 3 ] && write_log 12 "Error calling 'get_service_data()' - wrong number of parameters"
|
||||
|
||||
Reference in New Issue
Block a user