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.

Killing processes when Unraid takes array off-line

Featured Replies

I have some custom applications that are installed/started in my go script. Everything starts up like I want it. The problem is if I want to restart Unraid, I go to the web interface and click Stop to take the array off-line.

 

Now unraid seems to wait forever for certain processes before it can take the array offline. I need to manually kill these processes.

 

1) The processes don't seem to be using the filesystem, so I'm not sure why unraid needs to wait for them - is there any way to see if/what the processes are using to cause this behavior?

2)Is there any way I can have these processes killed when clicking the stop array button in the web UI? Either by installing/running them in some specific manner or if there is some way to attach a script to this stop event?

 

Thanks,

lsof /mnt/*

 

Tapatalk from CM10.1 Kindle

 

 

I think you just need to Telnet in to UnRAID and kill them with Linux commands.  I don't think the Web GUI has any option to automatically run additional shutdown scripts -- although if you're running UnMenu with the CleanPowerDown script that may be modifiable to include your applications.

 

I think you just need to Telnet in to UnRAID and kill them with Linux commands.  I don't think the Web GUI has any option to automatically run additional shutdown scripts -- although if you're running UnMenu with the CleanPowerDown script that may be modifiable to include your applications.

What version of unRAID are you using?  If the 5.0-rc series, then unRAID DOES have event hooks to start processes AFTER the array is online, and to kill them BEFORE the array is stopped.  See here on how you might use them:

http://lime-technology.com/forum/index.php?topic=26201.msg228957;topicseen#msg228957

 

 

In the 4.6/4.7 series you can use a unraid_addon_control.sh script similar to the one I described (and attached) in this post:

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

 

I've been using unraid_addon_control.sh for a number of years now and it works perfectly.  (It would work on the 5.X series too, but the built in events are easier for plugin users to utilize.)  I use it to start a number of add-ons after the array is started, and to properly stop them prior to the array when the array is being stopped.

 

Here is an example of somebody using the unraid_addon_control.sh script:

http://lime-technology.com/forum/index.php?topic=10978.msg199652#msg199652

 

Joe L.

"... unRAID DOES have event hooks to start processes AFTER the array is online, and to kill them BEFORE the array is stopped "  ==>  Very nice.  I wasn't aware of this change, but it's certainly a nice one  :)

  • Author

I think you just need to Telnet in to UnRAID and kill them with Linux commands.  I don't think the Web GUI has any option to automatically run additional shutdown scripts -- although if you're running UnMenu with the CleanPowerDown script that may be modifiable to include your applications.

What version of unRAID are you using?  If the 5.0-rc series, then unRAID DOES have event hooks to start processes AFTER the array is online, and to kill them BEFORE the array is stopped.  See here on how you might use them:

http://lime-technology.com/forum/index.php?topic=26201.msg228957;topicseen#msg228957

 

 

In the 4.6/4.7 series you can use a unraid_addon_control.sh script similar to the one I described (and attached) in this post:

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

 

I've been using unraid_addon_control.sh for a number of years now and it works perfectly.  (It would work on the 5.X series too, but the built in events are easier for plugin users to utilize.)  I use it to start a number of add-ons after the array is started, and to properly stop them prior to the array when the array is being stopped.

 

Here is an example of somebody using the unraid_addon_control.sh script:

http://lime-technology.com/forum/index.php?topic=10978.msg199652#msg199652

 

Joe L.

 

I am indeed using 5.0 rc3 so I will look into the event hooks. Exactly what I was looking for, thanks!

  • Author

I had a quick go at this, but no success. The events don't seem to be triggering.

 

I just had a look in the /usr/local/emhttp/plugins and I see some other applications placed event scripts there as well, however they seem to use unmounting_disks and not stopping_services, I will try with that name instead.

 

Edit: This event is not triggered on my installation of Unraid 5-rc3:

/usr/local/emhttp/plugins/<myappname>/event/stopping_services

 

Instead I use the following, which is working great:

/usr/local/emhttp/plugins/<myappname>/event/unmounting_disks

I had a quick go at this, but no success. The events don't seem to be triggering.

 

I just had a look in the /usr/local/emhttp/plugins and I see some other applications placed event scripts there as well, however they seem to use unmounting_disks and not stopping_services, I will try with that name instead.

 

Edit: This event is not triggered on my installation of Unraid 5-rc3:

/usr/local/emhttp/plugins/<myappname>/event/stopping_services

 

OOps... my example in that other post had "stopping_services" but the correct event name is "stopping_svcs"   I'll bet that name would work properly.  (I fixed the other post I had linked to, so hopefully it will be a better example for others)

Instead I use the following, which is working great:

/usr/local/emhttp/plugins/<myappname>/event/unmounting_disks

 

Glad it is working for you.

 

Joe L.

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.