5

I have a plist that is supposed to run a shell script, the shell script has been chmod +x /path/to/myscript and I have checked that it runs properly. Below is my plist:

<plist version="1.0">
    <dict>
    <key>Label</key>
        <string>com.system.osx</string>
    <key>ProgramArguments</key>
    <array>
    <string>sh</string>
       <string>/Users/myuser/Library/.system/connect.sh</string>
    </array>
<key>KeepAlive</key>
<true/>
<key>ResetAtClose</key>
<true/>
    <key>RunAtLoad</key>
        <true/>
    <key>StartInterval</key>
        <integer>60</integer>
    <key>AbandonProcessGroup</key>
        <true/>
    </dict>
</plist>

The plist has been loaded, and a program for debugging launchds named LaunchControl tells me that it throws error 127. enter image description here

Please help!

Patrick Cook
  • 458
  • 12
  • 27
  • One of the commands in your shell scripts yields this return code. For debugging purposes I suggest you add the command `set -ex` at the beginning of your script. This will log all the commands executed in your script and exit after the first error. Then check the contents of your STDERR file. The last line is the offending command. – LCC Jun 27 '15 at 11:49
  • Did you try giving full path to `sh`? `/bin/sh` – baf Jun 27 '15 at 20:59
  • I looked in the app store and I couldn't find this GUI program you're using - can you link to it? it looks useful !! –  Mar 25 '20 at 20:22

0 Answers0