don't require update_hook to be a shell script

This commit is contained in:
lurchi 2018-11-05 14:32:08 +01:00
parent 64949cf53a
commit 117008f41f
2 changed files with 3 additions and 3 deletions

View File

@ -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
}

View File

@ -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.