error's running script through Launchd
Hi,
I have been trying to get launchd to run a very simple shell script on startup, but the console keeps showing a “Job failed to exec(3) for weird reason” next to the .plist - I added the path to the script to $PATH and made it executable. The script works fine manually. – (The script is merely hiding my PC Google Drive folder “hideGoogleDrive.sh” as shown here:
#! /bin/bash
chflags nohidden /Volumes/PCDrive/Google\ Drive
___
Here is my .plist generated through Lingon X and saved in my /Library/LaunchAgents:
<?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>KeepAlive</key>
<dict>
<key>SuccessfulExit</key>
<false/>
</dict>
<key>Label</key>
<string>com.hideGDrive</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/hideGoogleDrive</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartOnMount</key>
<true/>
</dict>
</plist>
Any ideas? Thanks in advance.
Kevin
MacBook Pro with Retina display, OS X Mavericks (10.9)