Prevent powerdown on (mac) client

Howdy,

from time to time a client is shut down in the middle of a backup run, in my case especially Mac clients.

Usually, programs on mac can hold of the shutdown by asking if the program may be closed.

Would it be possible to implement such a feature that - if the backup is running - the shutdown is hold until backup is done, or at least a message, that the backup is running and if the user really wants to shutdown the client?

Thanx for your answers,
best regards
Falko