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 customize the powerdown script?

Featured Replies

Hello,

 

I have the powerdown script installed and i'd like to know if there is anyway I can modify it.

 

My server does not ave a screen attached and sometimes it crashes (something i am sitll trying to figure out). When it does though i go press the power button but I have some custom files running preventing it from shutting down.

 

Specifically i'd like it to run swapoff -a -v and rc.syslogd stop

 

Is there a simple way of editing the powerdown script to include those 2?

 

Thank you

It can be done, but you have to either overwrite the script with your own or edit it with sed at bootup using the go script.

 

You might consider adding a cache drive, and putting swap and the logs there... then they won't affect shutdown.

  • Author

Thanks Bubba,

 

I have a cache drive and swap is enabled on the drive. Currently though I moved the logs on one of the hard drives to capture the crashes that i'm experiencing, sometimes though they don't get captured, i guess because when i force reboot the server it loses the log file since it wasn't properly stopped.

  • 1 year later...

bump !  because i need some advice.

 

I'd like to run a script before any powerdown actions.

So I try to modify the powerdown script but I don't what to do (I'm not a linux expert, sorry).

Do I add it in the rc.unRAID script ?

And where ?

 

Thanks for any help. :)

 

bump !  because i need some advice.

 

I'd like to run a script before any powerdown actions.

So I try to modify the powerdown script but I don't what to do (I'm not a linux expert, sorry).

Do I add it in the rc.unRAID script ?

And where ?

 

Thanks for any help. :)

 

 

You can add another call out in this section like this.

 

[ -x /etc/rc.d/init.d/myscript  ] && /etc/rc.d/init.d/myscript stop

 

# Stop unraid:
unRAID_stop()
{
    logger "Stopping unRAID."

    diagnostic_dump

    [ -x /etc/rc.d/init.d/vmware  ] && /etc/rc.d/init.d/vmware stop
    [ -x /etc/rc.d/rc.samba ] && /etc/rc.d/rc.samba stop
    [ -x /etc/rc.d/rc.nfsd  ] && /etc/rc.d/rc.nfsd  stop
>> add your lines here

    logger "Killing active pids on the array drives"

Perfect.

Thanx WeeboTech :)

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.