1

I have an APC UPS connected to my Synology NAS and I am trying to get my mac (10.13) to connect to the 'network UPS' of sSynology.

So far I've been trying to follow this guide:

https://community.netgear.com/t5/New-to-ReadyNAS/NUT-on-OSX-10-6-Sharing-a-UPS-with-ReadyNAS-and-Computers/td-p/661293

And I've come so far as to have fink and findcommander installed. However this is where I seem to lose all info on how to proceed:

  • I can't seem to find just "nut" on finkcommander, so what should I install ?
  • If I go to the fink site and get an overview of the nut archives, which should I download and what do I do with them ?
Dave M
  • 4,494
Kevin V
  • 121

2 Answers2

1

So it seems I was missing the point of fink a bit.

had to do:

sudo apt-get update
fink install nut

Updating the package lists with apt-get update also fixed finkcommander.

After installing nut (5mins) Setting up the config in /sw/etc/nut/ as found on the net uncommenting a line:

MONITOR ups@<ip of synology> 1 monuser secret slave

After which sudo upsmon still gave an error of a missing library. Error:

dyld: Library not loaded /sw/lib/libssl.1.0.0.dylib

For this I installed openssl 1.0.2 using finkcommander (fink installed a version too high)

Then running sudo upsmon no error was given. Following https://community.netgear.com/t5/New-to-ReadyNAS/NUT-on-OSX-10-6-Sharing-a-UPS-with-ReadyNAS-and-Computers/td-p/661293 Showing 3 processes (one grep upsmon to be ignored):

ps aux | grep upsmon 

And finally showing me the info of the ups:

sudo upsc UPS@<ip of nas>

All that's left is auto starting upsmon on boot by adding the following : (credit https://superuser.com/questions/1228972/how-to-automatically-launch-nut-client-at-boot-on-macos/1358980#1358980). Edited to add "s" to LaunchDaemons.

sudo nano /Library/LaunchDaemons/org.networkupstools.upsmon.plist

and fill it with:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
   <key>Label</key>
   <string>org.networkupstools.upsmon</string>
   <key>OnDemand</key>
   <false/>
   <key>ProgramArguments</key>
   <array>
           <string>/sw/sbin/upsmon</string>
           <string>-D</string>
   </array>
</dict>
</plist>
Kevin V
  • 121
0

This issue is that libssl.1.0.0.dylib is a dynamic library. I ran into the same issue trying to use nut on an older MacOS. MacOS has a very complex scheme for permissions and it is easy to get them fouled up without even trying. In the case of nut, upsmon is dynamically linking to the .dylib when it really should be statically linked. You can hack the fink build file for upsmon.

sudo nano /sw/fink/dists/stable/main/finkinfo/net/nut.info

Find ConfigureParams: and where you see --enable-static, append in --disable-shared then have fink rebuild nut.

As far as I know there is no way to request fink or Mac Ports to always statically link. These decisions are not made by the developers of nut and they often make very bad decisions when it comes to bloated sub-packages.

Example:

https://trac.macports.org/ticket/41789

The developers of neon decided to pull in gtk and other libraries that completely loaded up upsmon with nonsense. What they should have done was statically linked the libs and also locked down neon @0.29.6_2 before it bloated up. For a system utility, with a very special purpose, it makes zero sense to use bloated up libs just because it is the path of least resistance.

anx
  • 10,888