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.

APCUPSD script disappearing

Featured Replies

I've got a separate machine plugged into my UPS, and I created a net rpc shutdown script (./powerout) to trigger from the powerout event within apccontrol.  It works great - once.  After testing (unplugging the UPS and letting everything shutdown as expected), when I restart the UNRAID server, the script is simply gone.  So is the copy I placed in ~.  #Confused.

 

Any insight appreciated.

Unraid extracts the OS from archives on the USB into RAM on every boot. If you don't store the script on a drive it won't survive a reboot. /boot is the USB flash drive, however since it's FAT32 normal linux permissions don't apply so you will need to copy it elsewhere to set execute permissions. The user scripts plugin handles this for you if you wish.

  • Author

@jonathanm To  make sure understand your idea, do you mean set up a user script (via plugin) to copy my 'powerout' script from a drive to the /etc/apcupsd directory on boot?  As i understand, the script has to be located there to be triggered by apccontrol.

That, or put a line in the go file to copy the file from /boot/powerout to /etc/apcupcupsd and set permissions to execute. However you are comfortable handling it.

  • Author

Thanks for the tip - I went with a user script triggered by array start.  That way if I add other steps I want to occur then, I just amend the script.  Worked great.

19 minutes ago, Graber said:

That way if I add other steps I want to occur then, I just amend the script. 

Your call, but I prefer the granular approach, one named script per function, that way it's easy to change schedules or whatever. Or just use # to disable or enable script lines. It's not like it takes much space either way.

  • Author

Good point.  Thanks.

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.