APCUPSD script disappearing


Recommended Posts

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.

Link to comment

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.

Link to comment
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.

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.