![]() |
Quote:
|
Quote:
Quote:
which is defined in Libc-498/include/paths.h as: #define _PATH_SENDMAIL "/usr/sbin/sendmail" |
Hello,
I have the same problem, my script doesn't send e-mail as root with launchd !! I wrote this in my script but it didn't work. <key>AbandonProcessGroup</key> <true/> :( |
Quote:
|
Hello,
Well sorry for the mistake but I wrote it in the launchd plist file not in the script. Code:
<?xml version="1.0" encoding="UTF-8"?>Code:
#!/bin/shI make the plist file with lingon but it doesn't send e-mails. |
Launchd is for the birds
Quote:
Some of you Unix gurus out there may see some benefit in dumping cron for this obtuse and difficult scheduler, but the very fact that it is bloody difficult to schedule a simple "email me" script underscores the fact that something that used to be *really* simple is now a big PITA. That is not progress. This discussion is the ONLY place on the web that I was able to turn up the source of this problem. I see there is an Apple technote on it as well, but it should be in the launchd man page. Well, maybe it is, but I wouldn't know: myserver:~ admin$ man launchd No manual entry for launchd myserver:~ admin$ man launchctl No manual entry for launchctl Gee thanks, Apple. |
Everything is easier once you know how.
Quote:
Quote:
myserver:~ admin$ man launchd No manual entry for launchd myserver:~ admin$ man launchctl No manual entry for launchctl myserver:~ admin$ man launchd.plist launchd.plist(5) BSD File Formats Manual launchd.plist(5) NAME launchd.plist -- System wide and per-user daemon/agent configuration files DESCRIPTION This document details the parameters that can be given to an XML property list that can be loaded into launchd with launchctl. Dropping launchd into google brings the following link up: http://developer.apple.com/macosx/launchd.html Quote:
At least the unix layer is accessible. If it wasn't, this would all be moot. |
Quote:
sandboxd[49674] krb5kdc(73) deny mach-lookup com.apple.CoreServices.coreservicesd Here's the script This is only the portion, the other part does other stuff and is working, so it's not permission of the script): #!/bin/sh # email subject SUBJECT="test script got an error" # Email To ? EMAIL="abc@xxxyyyzzz.com" # Email text/message EMAILMESSAGE="/tmp/emailmessage.txt" echo "test script got an error" > $EMAILMESSAGE # send an email using /bin/mail /usr/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE Here is the plist, in /Library/LauchDaemons: -rw-r--r--@ 1 root wheel 509 Sep 29 17:00 com.humanworldwide.test.plist <?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>com.humanworldwide.test</string> <key>LowPriorityIO</key> <false/> <key>Program</key> <string>/Users/humanadmin/Desktop/scripts/test.sh</string> <key>StartCalendarInterval</key> <dict> <key>Hour</key> <integer>5</integer> <key>Minute</key> <integer>02</integer> </dict> </dict> </plist> |
I have the same problem, however only on Snow Leopard Server - not on Leopard Server. The AbandonProcessGroup key does seem to fix the problem, but why this should only happen on SL for me is a mystery.
|
I had the same problem and solved it with that solution and additionally adapting the postfix.plist (/System/Library/LaunchDaemons/org.postfix.master.plist):
Code:
<?xml version="1.0" encoding="UTF-8"?> |
| All times are GMT -5. The time now is 05:45 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.