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)

Posted on Dec 15, 2013 7:33 AM

Reply
16 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

error's running script through Launchd

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.