<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class="">To be honest, I haven't experimented much with this, but I saw a normal shutdown/reboot when I just tried this from the command line (10.12):<br class=""><br class="">reboot    ~                         Mon Jun 12 08:36 <br class="">shutdown  ~                         Mon Jun 12 08:35 <br class="">clepple   ttys007                   Sun Jun  4 21:52 - shutdown (7+10:43)<br class=""></blockquote><br class=""><blockquote type="cite" class="">However, the "-u" flag did not seem to keep the Mac running for long after the shutdown (certainly seemed shorter than five minutes).</blockquote><br class=""></div><div class="">I have the same result showing a shutdown and reboot running manually. </div><div class="">Also the shutdown was shorter than five minutes. </div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class="">I also have to find a solution for starting up upsmon when the Mac starts<br class=""></blockquote><br class="">I never finished the integration for this branch, but...<br class=""><br class=""><a href="https://github.com/networkupstools/nut/compare/osx_launchd" class="">https://github.com/networkupstools/nut/compare/osx_launchd</a><br class=""><br class="">You can save off the Raw file, and replace @SBINDIR@ with /sw/sbin or whatever:<br class=""><br class=""><a href="https://github.com/networkupstools/nut/blob/161efce6c6fc32f205817ca71f8963af253cec59/scripts/launchd/org.networkupstools.upsmon.plist.in" class="">https://github.com/networkupstools/nut/blob/161efce6c6fc32f205817ca71f8963af253cec59/scripts/launchd/org.networkupstools.upsmon.plist.in</a></div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">I have made a file <span class="">com.networkupstools.upsmon.plist</span><span class="">. in /Library/LaunchDaemons and /Library/LauchAgents </span></div><div class=""><span class=""><br class=""></span></div>-rw-r--r--   1 root  wheel   708 Jun 14 14:59 com.networkupstools.upsmon.plist<div class=""><span class=""><br class=""></span></div><div class=""><span class="">But I cannot load it with the command: <br class=""></span><span class=""><br class=""></span><span class="">$ sudo launchctl load /Library/LaunchAgents/com.networkupstools.upsmon.plist</span></div><div class=""><span class=""><br class=""></span></div>/Library/LaunchAgents/com.networkupstools.upsmon.plist: <b class="">Invalid property list</b><br class=""><br class=""><span class=""><br class=""></span>com.networkupstools.upsmon.plist:<div class=""><span class=""><br class=""></span><div class=""><span class=""><?xml version="1.0" encoding="UTF-8"?><br class=""></span><span class=""><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "<a href="http://www.apple.com/DTDs/PropertyList-1.0.dtd" class="">http://www.apple.com/DTDs/PropertyList-1.0.dtd</a>"><br class=""></span><span class=""><plist version="1.0"><br class=""></span><span class=""><!-- Network UPS Tools (NUT): <a href="http://www.networkupstools.org" class="">http://www.networkupstools.org</a> --><br class=""></span><span class=""><dict><br class=""></span><span class="">        <key>Label</key><br class=""></span><span class="">        <string>org.networkupstools.upsmon</string><br class=""></span><span class="">        <key>ProgramArguments</key><br class=""></span><span class="">        <array><br class=""></span><span class="">                <string>/sw/sbin/upsmon</string><br class=""></span><span class="">                <string>-D</string> <!-- "-D" keeps upsmon from going into the background --><br class=""></span><span class="">        </array><br class=""></span><span class="">        <key>RunAtLoad</key><br class=""></span><span class="">        <true/><br class=""></span><span class="">        <key>KeepAlive</key><br class=""></span><span class="">        <dict><br class=""></span><span class="">                <key>SuccessfulExit</key><br class=""></span><span class="">                <false/> <!-- Do not respawn at shutdown time --><br class=""></span><span class="">        <dict/><br class=""></span><span class=""></dict><br class=""></span><span class=""></plist><br class=""></span><span class=""><br class=""></span><span class=""><br class=""></span><div class="">Kind Regards,<br class=""><br class="">Rob<br class=""><br class=""><br class=""></div><br class=""><blockquote type="cite" class="">On 12 Jun 2017, at 14:42, Charles Lepple <<a href="mailto:clepple@gmail.com" class="">clepple@gmail.com</a>> wrote:<br class=""><br class="">On Jun 11, 2017, at 7:15 AM, Robbie van der Walle <<a href="mailto:rvanderwalle@gmail.com" class="">rvanderwalle@gmail.com</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">I see only a reboot. Not a shutdown.  But is this normal because shutdown -u -h +0 is used? <br class=""><br class=""></blockquote>To be honest, I haven't experimented much with this, but I saw a normal shutdown/reboot when I just tried this from the command line (10.12):<br class=""><br class="">reboot    ~                         Mon Jun 12 08:36 <br class="">shutdown  ~                         Mon Jun 12 08:35 <br class="">clepple   ttys007                   Sun Jun  4 21:52 - shutdown (7+10:43)<br class=""><br class="">However, the "-u" flag did not seem to keep the Mac running for long after the shutdown (certainly seemed shorter than five minutes).<br class=""><br class="">Maybe I can test this on another machine with the full NUT stack later.<br class=""><br class="">Thanks for posting the osascript example - that looks useful!<br class="">_______________________________________________<br class="">Nut-upsuser mailing list<br class=""><a href="mailto:Nut-upsuser@lists.alioth.debian.org" class="">Nut-upsuser@lists.alioth.debian.org</a><br class="">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser<br class=""></blockquote><br class=""></div></div></body></html>