Execute graceful shutdown, if...


Recommended Posts

Hi all, first time post. I tried searching the User Customizations forum, saw some similar things, but nothing of my exact interest.

 

I want a graceful shutdown script in the event of power outage. The trigger for such an automated shutdown, for me, would be the inability to ping some site over some duration of time... maybe 5 minutes. (If my power goes down, my internet goes down).

 

I plan on purchasing a UPS specifically for my unRAID machine. The UPS only does its job if I can gracefully shutdown before battery runs out. Hence the desire for such a script.

 

This script should:

Stop all VMs

Stop the array

Stop any other process that may become lost/damaged in the event of a *sudden* shutdown (not versed with unRAID enough to know this list extensively)

 

Any ideas on how to achieve this? (I am not a programmer, but willing to give it a shot) Do you know of a script that already does this?

 

Cheers! and TIA

 

Edit: added a word

Edited by erlipton
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.