Run command when Wireguard server receives a connection

Hi,

Since the Connection is stateless, I cannot use hotplug.
I tried the below, unsuccessufuly.

[ "${ACTION}" = "ifup" -a "${DEVICE}" = "wg0" ] && {
    logger -t hotplug "Device: ${DEVICE} / Action: ${ACTION}"
    echo "${DEVICE}"
}