Protection from power failures! Mac, UPS, NAS & NUT

If you watched my YouTube video on protection from power failures (here), you know I promised to include the configuration files and commands on this blog.  So here they are:

To hide the ‘ups’ user:

sudo dscl . create /Users/ups IsHidden 1


In the upsmon.conf file, enter the following lines:



in the RUN_AS_USER <userid> section, and

MONITOR qnapups@ 1 upsmon 123456 slave

in the MONITOR <system> <powervalue> <username> <password> (“master”|”slave”) section.  I didn’t change anything else from the sample file provided with the software.

My org.networkupstools.nut.plist file looks like this:

<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “”&gt;
<plist version=”1.0″>

and it is located in the /Library/LaunchDaemons directory.

The command to load the daemon automatically on startup is:

sudo launchctl load /Library/LaunchDaemons/org.networkupstools.nut.plist

Hope you enjoyed the video tutorial and I hope it’s useful to you!





7 thoughts on “Protection from power failures! Mac, UPS, NAS & NUT

  1. Hi, I got a “/Library/LaunchDaemons/org.networkupstools.nut.plist: Invalid property list” message running the final Teminal command
    Additionally, I do not know, where can I see on the Mac the working connection to the UPS of the NAS. I have a Synology NAS, not a QNAP, but I think it does not matter.


    1. I noticed that my file has a small error in it. The second line should have a > symbol instead of &gt. I hope that helps. The end of the line should read:


  2. Trying to launch the monitor in Terminal …

    $ /usr/local/ups/sbin/upsmon
    dyld: Library not loaded: /sw/lib/libupsclient.4.dylib
    Referenced from: /usr/local/ups/sbin/upsmon
    Reason: image not found

    The library is in /usr/local/ups/lib/libupsclient.4.dylib


  3. I fixed it by instead of manually insyalling th software I installed it thru Homebrew and ajusted the path in the launch daemon. Wonderful , all is good. Could not have done it without your previous work. Thanks a lot.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s