Hello,
We have the same problem here but we managed to shutdown one server using an Expect script under Linux workstation. Unfortunately, we can only shutdown one server (Publisher).
We are not able to shutdown the subscriber when the UPS agent start the script. If we start the script manually, we can shutdown both servers. We are still looking to find a solution that works for multiple servers.