I’m using OS X Yosemite. I’m trying to run an sh script upon login, but I’m having problems. I created the following file in my /Library/LaunchAgents directory …
-rwxr-xr-x 1 root wheel 604 Oct 19 09:24 eXist.plist
The contents of the file are as follows:
<?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>eXist</string>
<key>Program</key>
<string>/Applications/eXist-db/bin/startup.sh</string>
<key>RunAtLoad</key>
<true/>
<key>UserName</key>
<string>root</string>
<key>StandardErorPath</key>
<String>/tmp/eXistDB.err</string>
<key>StandardOutputPath</key>
<string>/tmp/eXistDB.out</string>
</dict>
</plist>
However, nothing is getting run (at least no output files are getting generated) and I can’t figure out why. I have verified the path exists. How can I get my script to run upon login?
Edit:
To prove the path exists, here is the output when tryihng the path in the script versus what was suggested ...
Daves-MacBook-Pro-2:~ davea$ ls /Applications/eXist-db/bin/startup.sh
/Applications/eXist-db/bin/startup.sh
Daves-MacBook-Pro-2:~ davea$ ls /Applications/eXist-db.app/Contents/Resources/eXist-db/bin/startup.sh
ls: /Applications/eXist-db.app/Contents/Resources/eXist-db/bin/startup.sh: No such file or directory
/Library/LaunchAgents/
or~/Library/LaunchAgents/
?