Skip to content

Instantly share code, notes, and snippets.

@Govan
Created June 3, 2010 07:49
Show Gist options
  • Save Govan/423616 to your computer and use it in GitHub Desktop.
Save Govan/423616 to your computer and use it in GitHub Desktop.
<?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>AbandonProcessGroup</key>
<true/>
<key>Label</key>
<string>uk.co.leftbrained.iteleport_watcher</string>
<key>ProgramArguments</key>
<array>
<string>/Users/gavin/Tools/iteleport_watcher.sh</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>300</integer>
</dict>
</plist>
@bradwright
Copy link

This restarts crashes processes automagically:

<key>KeepAlive</key><true/>

@Govan
Copy link
Author

Govan commented Jun 3, 2010

Sadly not, my understanding of KeepAlive is that it controls invocation. That is, it determines whether or not to start the job. My problem is that the shell script being invoked fires up iTeleport, at the end of the launchd task, iTeleport is forced to quit as a child of the shellscript.

If I invoke the shellscript directly iTeleport stays up if I invoke it through launchd, it gets killed. :-/

@bradwright
Copy link

Why don't you just launch it with nohup then?

nohup /Users/gavin/Tools/iteleport_watcher.sh &

@Govan
Copy link
Author

Govan commented Jun 3, 2010

Nope, nohup is trumped by whatever launchd is doing to kill the process. I think I'll go dissect a login item's file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment