don't require update_hook to be a shell script
This commit is contained in:
parent
64949cf53a
commit
117008f41f
|
@ -128,11 +128,11 @@ function update {
|
|||
echo "[$(date "+%Y-%m-%d %H:%M")] updating ${domain} ..."
|
||||
if [ -n "$1" ]; then
|
||||
echo -n "| setting A=$1 ... "
|
||||
echo "status: "$(eval "IP4=$1 bash ${update_hook:-$default_update_hook}")
|
||||
echo "status: "$(eval "IP4=$1 ${update_hook:-$default_update_hook}")
|
||||
fi
|
||||
if [ -n "$2" ]; then
|
||||
echo -n "| setting AAAA=$2 ... "
|
||||
echo "status: "$(eval "IP6=$2 bash ${update_hook:-$default_update_hook}")
|
||||
echo "status: "$(eval "IP6=$2 ${update_hook:-$default_update_hook}")
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@ public_ip4_hook=
|
|||
|
||||
# The command to be called when an IP change is detected. Environment variables
|
||||
# will be set when calling it (for documentation see homeserverdns-update).
|
||||
# Default: ./homeserverdns-update
|
||||
# Default: homeserverdns-update
|
||||
update_hook=
|
||||
|
||||
# The address of the API, required for dyndns protocol.
|
||||
|
|
Loading…
Reference in New Issue