September 6, 20196 yr Unfortunately I do not have an APC UPS (mine is Cyberpower) that I can hook into Unraid's built-in functionality. However I do have a spare raspberry pi. My idea was to essentially write a script that runs every minute on the Unraid server to ping the raspberry pi (not plugged into a UPS) - if it replies, the power is working so do nothing. If no reply, shut down Unraid. The script itself is a quick and easy to do. However I don't know what the best "supported" way to run this script within Unraid would be. In a standard flavor Linux install, I'd just make a cronjob and be done with it - is that supported with Unraid? I don't know if crontabs get rebuilt every time UnraidOS gets updated. Is there another way I should do this?
September 6, 20196 yr Community Expert I have a Cyberpower UPS and it works fine with the built-in. Have you tried it? You can run and/or schedule user scripts with the User Scripts plugin.
September 6, 20196 yr Author 31 minutes ago, trurl said: I have a Cyberpower UPS and it works fine with the built-in. Have you tried it? You can run and/or schedule user scripts with the User Scripts plugin. My Cyberpower UPS doesn't have a USB/network connection. I'm looking into the User Scripts plugin but didn't know if there was an integrated OS-specific way to do it without a plugin (not that I'm against plugins). Thanks for the reply!
September 6, 20196 yr Community Expert Unraid is a stripped down and customized version of slackware linux. The User Scripts plugin is just giving a user interface to scripts and cron. You can certainly do all that at the command line, but you need to be aware that none of that will survive reboot and indeed any changes you might make to any of the usual linux OS folders will not survive a reboot. The OS is unpacked fresh from the archives on Flash at boot into RAM and the OS runs completely in RAM. The only persistent storage is the mounted disks and user shares at /mnt and the flash drive at /boot. The "old" way of running code at boot time is to put it in the config/go script on flash, but really the plugin is a better way of handling this.
Archived
This topic is now archived and is closed to further replies.