Hi, I'm new here, so if this is an inappropriate question, or if it's in the wrong forum, please forgive me...
I have downloaded a Mac OS X utility from the internet. It pretty much does what it's supposed to do, so I have no serious complaints. However, when I quit the app, it leaves behind a couple of "agent" processes in the "PrivilegedHelperTools space" which never go away, and I have to use "kill -INT" in the Terminal to get rid of them.
I've had to do this enough that I ended up creating a shell script which does the work for me. It's written as an infinite loop with a "sleep" period after each iteration, so that it effectively becomes a "demon" ... and, I've scheduled it to run at login using launchd/launchctl.
So in effect I've created one demon to look for and kill another demon. Not ideal, to say the least.
What I'd *really* like to do is modify the utilty that I downloaded so that in addition to running its own agents at startup it also launches my script. Then, when I quit the utility, my script would kill the orphaned agents, then quit itself.
Is this possible? And if so, how would I accomplish it?
I can see, after doing "Show Package Contents" in the Finder, that the utility has a Library/LoginItems folder, and in that folder I see the agents that are run, which never go away. I reasoned that I could add my shell script to that folder, and it, too, would run when the application launches. But that does not happen. So I'm guessing I have to edit a plist somewhere?
Any assistance would be most appreciated!
Thanks,
Barry