Browse Source

don't require update_hook to be a shell script

master
lurchi 3 years ago
parent
commit
117008f41f
  1. 4
      homeserverdns-daemon
  2. 2
      homeserverdns.cfg

4
homeserverdns-daemon

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

2
homeserverdns.cfg

@ -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…
Cancel
Save