Dhcp-script won't execute

Posting for posterity. This is what works for email notifications of WiFi lease events:

root@myhost:/etc/hotplug.d/dhcp# pwd
/etc/hotplug.d/dhcp
root@myhost:/etc/hotplug.d/dhcp# ls -al
drwxr-xr-x    1 root     root             0 Oct 17 10:18 .
drwxr-xr-x    1 root     root             0 Oct 14 18:44 ..
-rw-------    1 root     root           499 Oct 17 11:23 98-custom-script

contents of 98-custom-script

#!/bin/sh

notification_email="destination_email@somewhere"

if [ "$ACTION" = "add" ] || [ "$ACTION" = "update" ]; then
# if [ "$ACTION" = "add" ]; then
(
  tx1="WiFi $ACTION lease on $(uci get system.@system[0].hostname).$(uci get dhcp.@dnsmasq[0].domain)\r\n$MACADDR\r\n$IPADDR\r\n$HOSTNAME"
  tx2="$(echo $tx1 | sed s/:/-/g)"
  logger "DEBUG WiFi notification message: $tx2"
  printf "Subject:  WiFi Alert \r\n\r\n`date`\r\n$tx2" | msmtp "$notification_email"
)
fi

And of course the prerequisite is having msmtp set up on the router too.

Thanks guys for your help in getting this sorted out.

dmw73