How to run so script when the HOST is going to shutdown?

why-be-banned

Member
Apr 4, 2023
61
8
13
Hello,

How to execute some bash script when the HOST is going to shutdown, click the shutdown button on the WEB UI, or enter "shutdown" on ssh console.

I want to hibernate all VMs instead of shutdown VMs.
 
Last edited:
you'd need to write a custom systemd unit and put it in the appropriate place in the shutdown sequence.
 
  • Like
Reactions: Kingneutron