Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How can I add to shutdown script

Featured Replies

Hello,

 

I am running unRaid v4.7 and VirtualBox under unRaid.

 

I would like to add to the unRaid shutdown script a command to save and shutdown the VM before running unRAID unmount and shutdown.

The VM is not letting my shutdown script run - specifically in power failure (I have an ACP UPS).

 

I know the command I need for VirtualBox save and shutdown, I just don't know were the shutdown script is located and where in the script and how to add the command to it?

 

Any help?

 

Thank you

 

 

If unRAID is being shutdown cleanly, then you could create this:

 

/etc/rc.d/rc.local_shutdown

 

However, I don't know where in the sequence this would run in relation to the unRAID unmount.

 

Cheers.

If unRAID is being shutdown cleanly, then you could create this:

 

/etc/rc.d/rc.local_shutdown

 

However, I don't know where in the sequence this would run in relation to the unRAID unmount.

 

Cheers.

in 4.7, basically, it does not run at all.  There is no script run prior to stopping the array.

 

You can however install your own script to monitor the potential shutdown and then, in turn, stop other tasks before the array itself is taken off-line. 

 

See here for a script I use...

http://lime-technology.com/forum/index.php?topic=5686.msg53271#msg53271

 

for how to use it, see here:

http://lime-technology.com/forum/index.php?topic=5686.msg56731#msg56731

 

  • 2 weeks later...
  • Author

Thank you for the links - but it is too complicated for me to understand what is actually needed.

 

Does v5 have a solution in place as part of unRAID?

 

Thank you for the links - but it is too complicated for me to understand what is actually needed.

 

Does v5 have a solution in place as part of unRAID?

It has a skeletal script in place for a such a scheme.  However, it is probably just as difficult to use at this point in time.  Because of that, and the fact that it was evolving rapidly during the 5.0beta series, I've not elected to use it at all so far.

 

There is whole thread around somewhere where we were discussing how such a script should behave.  None of the solutions so far work really well, and most will leave the start-up/shutdown frozen if they are unable to complete their actions.  None of the solutions impliment any sort of start-up dependency chain, so a needed package can be installed/started first before one dependent upon it.

 

You'll just have to wait until somebody else develops a script or package easier for you to use.

 

Joe L.

I had the same problem just this weekend.  I'm at work right now so I can't provide the specifics of what I did, but here's an overview:

 

I created a file in /boot/config called killoffenders - this stops my vm, and kills all the related services, and also kills Transmission, and makes sure a couple other things are no longer running (usenet/transmission/etc).  The last thing it does is run umount -l /mnt/cache (forcing the cache drive to unmount lazily).  All my usenet/vm/torrent services run from my cache drive and if something gets corrupt there I'm not too worried about it, I'd rather the machine shuts down safely when the power is out and deal with any cache issues later.

 

I then opened the clean powerdown-1.02-noarch-unRAID.tgz file, added the line /boot/config/killoffenders to the file /sbin/powerdown after the line /etc/rc.d/rc.unRAID stop and saved the modified tgz. 

 

I'm still allowing the normal powerdown to be installed, and then I'm installing my modified one after, by adding a line to my /config/go file.  I know I don't need to install both files.

 

One caveat of this approach is that if you want to modify the configuration of the package you will need to modify the file you generated, or the modifications will be overwritten.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.