Graceful shutdown and reboot from command line


Recommended Posts

Hi.  I'm currently in the process of migrating to unRaid as my storage and vm solution.  I've got all my data migrated but when setting up Plex docker I've experienced two times now that the WebUI stops responding.  My question is thus; is there a simple way to gracefully shutdown from the command line?  As far as I've found there is no simple way to restart the web ui, and the general consensus seems to be to just restart the entire server.  First time I ended up just forcing a shutdown by hard switching off, but now the web interface has crashed again and I wonder if there's at least a way to shut it down cleanly.  I've searched, but most answers I find are really old, and I'm unsure if they still apply.  (Like this 9 year old one one for instance : )

 

 

I'm running "latest" unRAID, don't know the version as the WebUI is crashed, but it was downloaded like a month ago.  Any help would be appreciated.

Link to comment
7 hours ago, sindre said:

Hmm, looking at the FAQ I found this:

 

That indicates there is a powerdown script.  I'll try that once the two preclear operations I have going are done.

 

I've updated the FAQ entry to use poweroff instead.  Thanks for pointing it out.

Link to comment
7 hours ago, tr0910 said:

There are 2 scripts. The old one was developed by the community an no longer works. The new one is built into the latest unRAID. It is poweroff.

via mobile
 

6.3.2 still includes the powerdown script.  Its been deprecated as in that its no longer the original script as developed by dlandon.  What it merely does is call poweroff / reboot

#!/bin/bash
logger "/usr/local/sbin/powerdown has been deprecated"
if [[ "$1" == "-r" ]]; then
  /sbin/reboot
else
  /sbin/poweroff
fi

Since I've been typing powerdown and powerdown -r for years now, muscle memory is burned into me to only use that (especially since previously poweroff / reboot were not graceful at all in unRaid.

 

TBQH, I'm going to keep posting the powerdown commands if / when I help someone as its what I'm used to.  (and if LT ever actually deletes the powerdown script, then I'm going to add it back in - Just too used to it to change.

  • Like 2
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.