> sudo launchctl list|fgrep -v com.appreturns for me(10.12.5): PID Status Label - 78 org.networkupstools.upsmon system log: Jun 15 16:27:07 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon): Service only ran for 0 seconds. Pushing respawn out by 10 seconds. Jun 15 16:27:17 c01 com.apple.xpc.launchd[1] (org.networkupstools.upsmon[4259]): Service could not initialize: 16F73: xpcproxy + 11769 [1505][34964CF1-9965-3B4D-ADC7-6FBC6669C56D]: 0x2 Did you change anything in the plist or used mine ? Kind Regards, Rob> On 15 Jun 2017, at 15:01, Charles Lepple <clepple at gmail.com> wrote: > > On Jun 14, 2017, at 1:54 PM, Robbie van der Walle <rvanderwalle at gmail.com <mailto:rvanderwalle at gmail.com>> wrote: >> >> <?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 <http://www.apple.com/DTDs/PropertyList-1.0.dtd>"> >> <plist version="1.0"> >> <dict> >> <key>Label</key> >> <string>org.networkupstools.upsmon</string> >> <key>RunAtLoad</key> >> <true/> >> <key>ProgramArguments</key> >> <array> >> <string>/sw/sbin/upsmon</string> >> <string>-D</string> <!-- "-D" keeps upsmon from going into the background --> >> </array> >> <key>KeepAlive</key> >> <true/> >> <key>SuccessfulExit</key> >> <false/> <!-- Do not respawn at shutdown time --> >> </dict> >> </plist> >> >> >> sudo launchctl load /Library/LaunchDaemons/org.networkupstools.upsmon.plist >> >> Doesn?t return an error. But when I check of upsmon is running I don?t see it running. > > This works for me on 10.12.5. (There is a warning that SuccessfulExit is an "unknown key" from launchd.) > > $ sudo launchctl list|fgrep -v com.app > PID Status Label > ... > 8981 0 org.networkupstools.upsmon > ... > > Does anything for upsmon show up in system.log in Console.app? > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/7235687e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3583 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/7235687e/attachment.bin>
On Jun 15, 2017, at 10:31 AM, Robbie van der Walle <rvanderwalle at gmail.com> wrote:> > Did you change anything in the plist or used mine ? >Copied and pasted from yours. If you run "sudo /sw/sbin/upsmon -D" from the command line, does it exit immediately? I did have to fiddle with permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: $ ls -l /sw/etc/nut ... -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/bcdb9b91/attachment.html>
I deleted the plist file and rebooted: sudo /sw/sbin/upsmon -D Network UPS Tools upsmon 2.7.4 0.000000 fopen /sw/var/run/upsmon.pid: No such file or directory 0.044649 UPS: ups at ip address (slave) (power value 1) 0.081597 Using power down flag file /etc/killpower 0.162720 debug level is '1' 0.538410 Trying to connect to UPS [ups at ip address] 0.540345 Logged into UPS ups at ip address fopen /sw/var/run/upsmon.pid: No such file or directory This is strange because the file exits. Let me check why this is happening. It would explain why the pid is not running. Kind Regards, Rob> On 15 Jun 2017, at 16:38, Charles Lepple <clepple at gmail.com> wrote: > > On Jun 15, 2017, at 10:31 AM, Robbie van der Walle <rvanderwalle at gmail.com <mailto:rvanderwalle at gmail.com>> wrote: >> >> Did you change anything in the plist or used mine ? >> > > Copied and pasted from yours. > > If you run "sudo /sw/sbin/upsmon -D" from the command line, does it exit immediately? > > I did have to fiddle with permissions of config files - Fink currently builds NUT to run as user "nobody", so I have the following non-default permissions: > > $ ls -l /sw/etc/nut > ... > -rw-r-----+ 1 root nobody 2177 Jun 15 08:42 upsd.users > -rw-r-----+ 1 root nobody 15455 Jun 15 08:50 upsmon.conf > > _______________________________________________ > Nut-upsuser mailing list > Nut-upsuser at lists.alioth.debian.org > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/nut-upsuser-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/85f17882/attachment-0001.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 3583 bytes Desc: not available URL: <http://lists.alioth.debian.org/pipermail/nut-upsuser/attachments/20170615/85f17882/attachment-0001.bin>