2

I'm trying to set up a UPS solution which should shut down my Mac automatically. I've followed these instructions: Protection from power failures! Mac, UPS, NAS & NUT/video.

This requires to create a launch daemon.

I made the launch daemon plist but I get the following error /Library/LaunchDaemons/org.networkupstools.nut.plist: Invalid property list

Any ideas?

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>/usr/local/ups/sbin/upsmon</string>
<string>-D</string>
</array>
</dict>
</plist>
  • 1
    Essentially the plist has a syntax error - look for missing or extra formatting characters (<, >, etc). – red_menace Feb 16 at 17:50
  • 1
    You could consider uploading or copying/pasting the .plist, if you think we might spot the error more easily than you. By the way, this doesn't relate to AppleScript, unless you can enlighten me. Otherwise, I'll remove the [AppleScript] tag in a couple of hours. – CJK Feb 16 at 18:05
  • 1
    There isn't an issue with the syntax of the edit - is that the contents of the actual file used? Note that plutil can be used to check a property list file for syntax errors. – red_menace Feb 16 at 19:40
  • 1
    1. Label≠plist name: rename the plist to org.networkupstools.upsmon.plist or the Label to org.networkupstools.nut! 2. Check whether /usr/local/ups/sbin/upsmon exists and modify it if necessary. 3. Trailing new line at the end! Alternative: Network UPS Tools on macOS High Sierra – klanomath Feb 16 at 19:46
  • I followed this instruction: youtube.com/watch?v=8rWlouT18pw and this which is actually the same. michaelwoodphoto.wordpress.com/2018/01/30/… – egIjuggernaut Feb 17 at 18:58

You must log in to answer this question.

Browse other questions tagged .