Jump to content

Safe/clean shutdown and system restart from the command line


Recommended Posts

Is there a way to do this?

 

I'd like to perform some actions before shutdown/restart using bash scripts. Is there a way that I can hook into the existing shutdown/restart to do this? Failing that I guess I'd like to make my own shutdown script that calls the safe shutdown somehow so that I don't need a parity check on reboot.

Link to comment

In the   /sbin   directory, there is this command--- dated march 8, 2021:

 

image.png.fa5189cfaf9f2a25b799023c124093f4.png

 

And in the forum, there is this suggestions:

 

https://forums.unraid.net/topic/50490-solved-commands-to-start-and-stop-array/#comment-496967

 

The problem (as my memory serves me) is making sure that the array, Dockers and VM's are all stopped properly and that 'ArrayStopped' flag is properly written to the flash drive to achieve a 'clean' shutdown.   (There are situations where the GUI buttons don't always succeed in meeting all of these requirements!)

 

 

Edited by Frank1940
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.

×
×
  • Create New...