<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-22117</id>
	<title>Nabble - Launchd</title>
	<updated>2009-12-15T05:38:55Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Launchd-f22117.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Launchd-f22117.html" />
	<subtitle type="html">The &lt;a href=&quot;http://launchd.macosforge.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Launchd&lt;/a&gt; project exists to help developers bootstrap their slice of code into the relatively large operating system.&lt;br&gt;
The soul of &lt;b&gt;Launchd&lt;/b&gt; embraces imperfection and fluidity as a fact of life.&lt;br&gt;Let’s enumerate how:
&lt;ul&gt;
&lt;li&gt;Encouraging “Best Effort” Style Programming&lt;/li&gt;
&lt;li&gt;Encouraging Robustness in a Modern World&lt;/li&gt;
&lt;li&gt;Encouraging More Predictable Availability of Services&lt;/li&gt;
&lt;li&gt;Encouraging “Pay as You Go” Computing&lt;/li&gt;
&lt;/ul&gt;</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26794943</id>
	<title>Re: multiple commands in one launchd item</title>
	<published>2009-12-15T05:38:55Z</published>
	<updated>2009-12-15T05:38:55Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Hi Scott,
&lt;br&gt;&lt;br&gt;It should be:
&lt;br&gt;&lt;br&gt;/bin/bash
&lt;br&gt;-c
&lt;br&gt;code; code; code
&lt;br&gt;&lt;br&gt;on separate item lines.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;The file redirection should be:
&lt;br&gt;&lt;br&gt;bin/echo &amp;quot;this is a test&amp;quot; &amp;gt;&amp;gt; /tmp/filename
&lt;br&gt;&lt;br&gt;in at least bash. The man page of echo utility does say that
&lt;br&gt;the command line should be similar or identical to the shell
&lt;br&gt;command.
&lt;br&gt;&lt;br&gt;A.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26794943&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26763180p26794943.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26790654</id>
	<title>Re: multiple commands in one launchd item</title>
	<published>2009-12-14T23:26:13Z</published>
	<updated>2009-12-14T23:26:13Z</updated>
	<author>
		<name>Scott Haneda-3</name>
	</author>
	<content type="html">Thanks Damien, comments, below. &amp;nbsp;I am working with an already &amp;nbsp;
&lt;br&gt;installed app to add value to it, so there is a limited amount of &amp;nbsp;
&lt;br&gt;stuff I can install before the user may feel I a installing too much. &amp;nbsp; 
&lt;br&gt;If I can get away with one plist I would love it.
&lt;br&gt;&lt;br&gt;The general goal is
&lt;br&gt;1) Run installed
&lt;br&gt;2) install launchd item in /Library/LaunchDaemons/
&lt;br&gt;3) Run on schedule of load, and 300 seconds
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; a) chown 0:0 a specific file in the logded in users dir
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; b) set the executable bit to that file.
&lt;br&gt;&lt;br&gt;Yes, I can put that in a shell script, I am trying to keep it as &amp;nbsp;
&lt;br&gt;simple as possible. &amp;nbsp;Having two commands in a plist does not seem like &amp;nbsp;
&lt;br&gt;a lot.
&lt;br&gt;&lt;br&gt;My tests below were bad, but I did not want to give too much of my &amp;nbsp;
&lt;br&gt;idea away, so I worked out some basic tests that ended up on my &amp;nbsp;
&lt;br&gt;desktop. &amp;nbsp;Sorry about that. &amp;nbsp;I do always use full paths, I always &amp;nbsp;
&lt;br&gt;assume ENV and PATH are going to be non known.
&lt;br&gt;&lt;br&gt;More below...
&lt;br&gt;&lt;br&gt;On Dec 13, 2009, at 3:07 PM, Damien Sorresso wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Dec 12, 2009, at 6:46 PM, Scott Haneda wrote:
&lt;br&gt;&amp;gt;&amp;gt; If I can run a command in the terminal, should it also be possible &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; to put that entire command into a launchhd plist?
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; For example, this will work in a shell, as a one liner:
&lt;br&gt;&amp;gt;&amp;gt; cd /Users/me/Desktop; mkdir zzzzzzzz; cd zzzzzzzz; touch test; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; chown 0:0 test; rm -rf /Users/me/Desktop/zzzzzzzz;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Putting that into a plist, I get errors to syslog:
&lt;br&gt;&amp;gt;&amp;gt; Dec 12 18:37:23 macbook com.test.me.test.foo[1596]: /usr/bin/cd: &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; line 4: cd: /Users/me/Desktop;: No such file or directory
&lt;br&gt;&amp;gt;&amp;gt; Dec 12 18:37:23 macbook com.apple.launchd[1] &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; (com.test.me.test.foo[1596]): Exited with exit code: 1
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Here is how I have tried it:
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;dict&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;string&amp;gt;com.test.me.test.foo&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;array&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;/Users/me/Desktop;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;mkdir&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;touch&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;chown&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;0:0&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;rm&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;-rf&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 		&amp;lt;string&amp;gt;/Users/me/Desktop/zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;/array&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;true/&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 	&amp;lt;integer&amp;gt;10&amp;lt;/integer&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;/plist&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have also tried removing the &amp;quot;;&amp;quot; terminator, and reloading, that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; does not seem to work either. &amp;nbsp;I am resoting to shoving these &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; commands into a shell script, which launchd will then call. &amp;nbsp;This &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; works, but is one more file I need to manage, and wold love to be &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; able to manage this in one launchd file.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; My goal, it to have a schedule, once every 5 minutes, it will chown &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; 0:0 a file, and set the executable bit on it. &amp;nbsp;So something like &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; cd /Users/me/.hidden; chown 0:0 .runner; chmod +x .runner;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Several things. Firstly, launchd is not a shell interpreter, so &amp;nbsp;
&lt;br&gt;&amp;gt; please don't assume that it acts like one or makes the same &amp;nbsp;
&lt;br&gt;&amp;gt; guarantees. launchd jobs consist of a plist describing the job and &amp;nbsp;
&lt;br&gt;&amp;gt; an executable file that will be run. This is our model, and your &amp;nbsp;
&lt;br&gt;&amp;gt; deployment scenario clearly allows for you being able to install a &amp;nbsp;
&lt;br&gt;&amp;gt; plist into /Library/LaunchDaemons, so there's no reason you couldn't &amp;nbsp;
&lt;br&gt;&amp;gt; also deploy a shell script to, say, /usr/local/bin.
&lt;/div&gt;&lt;br&gt;Trying to not deploy a file a file is I need not too, that is the goal &amp;nbsp;
&lt;br&gt;at least. &amp;nbsp;Setting 0:0 on a file and +x on it is all I want to do. &amp;nbsp;I &amp;nbsp;
&lt;br&gt;have to find out the users login name so I know where the file is I &amp;nbsp;
&lt;br&gt;want to act on, but that should not be too hard.
&lt;br&gt;&lt;br&gt;Suggestions welcome.
&lt;br&gt;&lt;br&gt;&amp;gt; Secondly, you're doing yourself a disservice by putting the commands &amp;nbsp;
&lt;br&gt;&amp;gt; in the launchd.plist directly, because you are forcing yourself to &amp;nbsp;
&lt;br&gt;&amp;gt; reload the plist every time you make a change to the embedded &amp;nbsp;
&lt;br&gt;&amp;gt; script. If you just point to an executable file on-disk, you can &amp;nbsp;
&lt;br&gt;&amp;gt; change it to your heart's content without ever having to reload the &amp;nbsp;
&lt;br&gt;&amp;gt; launchd job.
&lt;br&gt;&lt;br&gt;This plist acts as an emergency item, the idea is it should never be &amp;nbsp;
&lt;br&gt;used, in the event it is used, it may save your life, otherwise, it &amp;nbsp;
&lt;br&gt;should just run, every 5 minutes, and do nothing other than keep those &amp;nbsp;
&lt;br&gt;permissions and +x set.
&lt;br&gt;&lt;br&gt;&amp;gt; Thirdly, you should be specifying the full paths to these commands &amp;nbsp;
&lt;br&gt;&amp;gt; in your shell script or guaranteeing that your PATH is sanitized, &amp;nbsp;
&lt;br&gt;&amp;gt; just as a matter of best practices.
&lt;br&gt;&lt;br&gt;Yeah, my bad, I always do, I was just being sloppy in my testing as I &amp;nbsp;
&lt;br&gt;have been down the road so many times before, I sort of knew it did &amp;nbsp;
&lt;br&gt;not matter in that case.
&lt;br&gt;&lt;br&gt;&amp;gt; This kind of sanitation is much easier to accomplish in a single &amp;nbsp;
&lt;br&gt;&amp;gt; shell script file. (Remember, launchd doesn't make any guarantees &amp;nbsp;
&lt;br&gt;&amp;gt; about what its PATH is or what PATH its jobs will inherit.)
&lt;br&gt;&lt;br&gt;Noted, thanks.
&lt;br&gt;&lt;br&gt;&amp;gt; Fourthly, you're clearly working with your own user account here, so &amp;nbsp;
&lt;br&gt;&amp;gt; this job should be an agent, not a daemon, so that the files you &amp;nbsp;
&lt;br&gt;&amp;gt; create are created with the proper ownership and permissions.
&lt;br&gt;&lt;br&gt;Just in testing, as I need the ability to set chown 0:0, I will need &amp;nbsp;
&lt;br&gt;to be in /Library/LaunchDaemons/ when all is said and done. &amp;nbsp;I will &amp;nbsp;
&lt;br&gt;make a nice OS X installer for it as well.
&lt;br&gt;&lt;br&gt;&amp;gt; Lastly, if you're absolutely dead-set on doing things this way,
&lt;br&gt;&lt;br&gt;For this one, yes, in every other case, no, I have 20's of shell &amp;nbsp;
&lt;br&gt;sccipts in ~/bin/whatever that do things, and each is called by a &amp;nbsp;
&lt;br&gt;launchd items, I like it that was, as I can test it and not play the &amp;nbsp;
&lt;br&gt;unlod/load game all the time.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; you have to again remember that launchd is not a shell interpreter, &amp;nbsp;
&lt;br&gt;&amp;gt; so those commands have no syntactical meaning to it. It just sees &amp;quot;/ 
&lt;br&gt;&amp;gt; Users/me/Desktop;&amp;quot; and copies *that entire string* as the argument. &amp;nbsp;
&lt;br&gt;&amp;gt; Since it's not a shell interpreter, the ending semi-colon doesn't &amp;nbsp;
&lt;br&gt;&amp;gt; carry any meaning. It's just the second argument you want passed &amp;nbsp;
&lt;br&gt;&amp;gt; into an execve(3) call with &amp;quot;cd&amp;quot; as its first argument.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; What you should be doing is specifying a Program pointing to the &amp;nbsp;
&lt;br&gt;&amp;gt; shell of your choice (i.e. &amp;quot;/bin/bash&amp;quot;), followed by the appropriate &amp;nbsp;
&lt;br&gt;&amp;gt; flag to ask the shell to interpret the argument following as a &amp;nbsp;
&lt;br&gt;&amp;gt; script (&amp;quot;-c&amp;quot; for bash).
&lt;/div&gt;&lt;br&gt;So for example, just to be sure I have this right:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/bin/bash -c cd /Users/useranme/.hidden/commander; \	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/sbin/chown0:0 /Users/useranme/.hidden/commander; \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /bin/chmod +x /Users/useranme/.hidden/commander;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * Probably have to do that all on one line and nick the \ but is that &amp;nbsp;
&lt;br&gt;the general idea?
&lt;br&gt;&lt;br&gt;Or is it:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/bin/bash -c /usr/bin/cd /Users/useranme/.hidden/commander; \	
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /bin/bash -c /usr/sbin/chown0:0 /Users/useranme/.hidden/commander; \
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /bin/bash -c /bin/chmod +x /Users/useranme/.hidden/commander;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/string&amp;gt;
&lt;br&gt;&lt;br&gt;I will probably hand write the plist pre-install to hard code the &amp;nbsp;
&lt;br&gt;username into it, so there is no chance at all dfor confusion.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;Thanks for your pointers.
&lt;br&gt;&lt;br&gt;Just out of curiosity, why does this not work in launchd?
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/bin/echo &amp;quot;test&amp;quot; &amp;gt;&amp;gt; &amp;quot;/tmp/this is a test&amp;quot;&amp;lt;/string&amp;gt;
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Scott * If you contact me off list replace talklists@ with scott@ *
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26790654&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26763180p26790654.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26780910</id>
	<title>Re: [clamav] launchdaemon executes clamdscan several times when scanning</title>
	<published>2009-12-14T08:45:10Z</published>
	<updated>2009-12-14T08:45:10Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Thanks.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26780910&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-clamav--launchdaemon-executes-clamdscan-several-times-when-scanning-tp26776252p26780910.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26776561</id>
	<title>Re: [clamav] launchdaemon executes clamdscan several times when scanning</title>
	<published>2009-12-14T03:48:41Z</published>
	<updated>2009-12-14T03:48:41Z</updated>
	<author>
		<name>Thomas Clement</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Missing arguments are considered to be wildcard.
&lt;br&gt;You should add the &amp;quot;Minute&amp;quot; key and set it to &amp;quot;0&amp;quot; (or whatever you like).
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Thomas
&lt;br&gt;&lt;br&gt;On Dec 14, 2009, at 12:20 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776561&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev.admin@...&lt;/a&gt; wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Back to the original purpose of launchd...
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I've installed clamav, 64bit, and wrote a LaunchDaemon to
&lt;br&gt;&amp;gt; execute once a day at a certain time on a certain volume.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, when the LaunchDaemon executes, it seems to scan
&lt;br&gt;&amp;gt; the volume several times. At first I though it was clamav
&lt;br&gt;&amp;gt; but I then wrote a bash script that adds an entry to the
&lt;br&gt;&amp;gt; log file, executes clamdscan and then adds another log
&lt;br&gt;&amp;gt; entry.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Any ideas would be appreciated.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; A.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; LaunchDaemon
&lt;br&gt;&amp;gt; ------------
&lt;br&gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;dict&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;Disabled&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;false/&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;string&amp;gt;net.clamav.clamdscan.app&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;Program&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;string&amp;gt;/Volumes/usr/arc_sys/scripts.bash/net.localhost.clamd.app.sh&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;StartCalendarInterval&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;key&amp;gt;Hour&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;integer&amp;gt;9&amp;lt;/integer&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/plist&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Bash script (net.localhost.clamd.app.sh)
&lt;br&gt;&amp;gt; ----------------------------------------
&lt;br&gt;&amp;gt; #!/bin/bash
&lt;br&gt;&amp;gt; LOG=/Volumes/gnu/sec/var/log/clamav/clamd.log
&lt;br&gt;&amp;gt; APP=/Volumes/gnu/sec/usr/bin/clamdscan
&lt;br&gt;&amp;gt; OBJ=/Volumes/app
&lt;br&gt;&amp;gt; # append start timestamp to log
&lt;br&gt;&amp;gt; echo $(date &amp;quot;+%a %b %d %T %Y&amp;quot;) &amp;quot;-&amp;gt; *** Started scanning: &amp;nbsp;$OBJ&amp;quot; &amp;gt;&amp;gt; $LOG
&lt;br&gt;&amp;gt; # start scan
&lt;br&gt;&amp;gt; /Volumes/gnu/sec/usr/clamav/bin/clamdscan $OBJ
&lt;br&gt;&amp;gt; # append finish timestamp to log
&lt;br&gt;&amp;gt; echo $(date &amp;quot;+%a %b %d %T %Y&amp;quot;) &amp;quot;-&amp;gt; *** Finished scanning: $OBJ&amp;quot; &amp;gt;&amp;gt; $LOG
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Log file (clamd.log)
&lt;br&gt;&amp;gt; --------------------
&lt;br&gt;&amp;gt; Mon Dec 14 09:00:00 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:13:53 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:13:54 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:28:06 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:28:06 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:41:27 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:41:27 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:54:55 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 09:54:55 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:00:00 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:06:38 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:06:38 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:11:51 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:11:51 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:12:45 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:12:45 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:17:53 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:17:53 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:24:26 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:24:26 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:30:31 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:30:31 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;&amp;gt; Mon Dec 14 10:30:31 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:44:22 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 10:44:22 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 11:02:02 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 11:02:02 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;&amp;gt; Mon Dec 14 11:15:38 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; _______________________________________________
&lt;br&gt;&amp;gt; launchd-dev mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776561&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;/div&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776561&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-clamav--launchdaemon-executes-clamdscan-several-times-when-scanning-tp26776252p26776561.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26776252</id>
	<title>[clamav] launchdaemon executes clamdscan several times when scanning</title>
	<published>2009-12-14T03:20:00Z</published>
	<updated>2009-12-14T03:20:00Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Back to the original purpose of launchd...
&lt;br&gt;&lt;br&gt;I've installed clamav, 64bit, and wrote a LaunchDaemon to
&lt;br&gt;execute once a day at a certain time on a certain volume.
&lt;br&gt;&lt;br&gt;However, when the LaunchDaemon executes, it seems to scan
&lt;br&gt;the volume several times. At first I though it was clamav
&lt;br&gt;but I then wrote a bash script that adds an entry to the
&lt;br&gt;log file, executes clamdscan and then adds another log
&lt;br&gt;entry.
&lt;br&gt;&lt;br&gt;Any ideas would be appreciated.
&lt;br&gt;&lt;br&gt;A.
&lt;br&gt;&lt;br&gt;&lt;br&gt;LaunchDaemon
&lt;br&gt;------------
&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Disabled&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;false/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;net.clamav.clamdscan.app&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Program&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/Volumes/usr/arc_sys/scripts.bash/net.localhost.clamd.app.sh&amp;lt;/ 
&lt;br&gt;string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;StartCalendarInterval&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;dict&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Hour&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;integer&amp;gt;9&amp;lt;/integer&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/plist&amp;gt;
&lt;br&gt;&lt;br&gt;Bash script (net.localhost.clamd.app.sh)
&lt;br&gt;----------------------------------------
&lt;br&gt;#!/bin/bash
&lt;br&gt;LOG=/Volumes/gnu/sec/var/log/clamav/clamd.log
&lt;br&gt;APP=/Volumes/gnu/sec/usr/bin/clamdscan
&lt;br&gt;OBJ=/Volumes/app
&lt;br&gt;# append start timestamp to log
&lt;br&gt;echo $(date &amp;quot;+%a %b %d %T %Y&amp;quot;) &amp;quot;-&amp;gt; *** Started scanning: &amp;nbsp;$OBJ&amp;quot; &amp;gt;&amp;gt; $LOG
&lt;br&gt;# start scan
&lt;br&gt;/Volumes/gnu/sec/usr/clamav/bin/clamdscan $OBJ
&lt;br&gt;# append finish timestamp to log
&lt;br&gt;echo $(date &amp;quot;+%a %b %d %T %Y&amp;quot;) &amp;quot;-&amp;gt; *** Finished scanning: $OBJ&amp;quot; &amp;gt;&amp;gt; $LOG
&lt;br&gt;&lt;br&gt;Log file (clamd.log)
&lt;br&gt;--------------------
&lt;br&gt;Mon Dec 14 09:00:00 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 09:13:53 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 09:13:54 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 09:28:06 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 09:28:06 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 09:41:27 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 09:41:27 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 09:54:55 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 09:54:55 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 10:00:00 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;Mon Dec 14 10:06:38 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;Mon Dec 14 10:06:38 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;Mon Dec 14 10:11:51 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 10:11:51 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 10:12:45 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;Mon Dec 14 10:12:45 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;Mon Dec 14 10:17:53 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;Mon Dec 14 10:17:53 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;Mon Dec 14 10:24:26 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;Mon Dec 14 10:24:26 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/app
&lt;br&gt;Mon Dec 14 10:30:31 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 10:30:31 2009 -&amp;gt; *** Finished scanning: /Volumes/app
&lt;br&gt;Mon Dec 14 10:30:31 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 10:44:22 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 10:44:22 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 11:02:02 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;Mon Dec 14 11:02:02 2009 -&amp;gt; *** Started scanning: &amp;nbsp;/Volumes/usr
&lt;br&gt;Mon Dec 14 11:15:38 2009 -&amp;gt; *** Finished scanning: /Volumes/usr
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26776252&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/-clamav--launchdaemon-executes-clamdscan-several-times-when-scanning-tp26776252p26776252.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26775224</id>
	<title>Re: launchd and hdiutils</title>
	<published>2009-12-14T01:43:21Z</published>
	<updated>2009-12-14T01:43:21Z</updated>
	<author>
		<name>Quinn-9</name>
	</author>
	<content type="html">At 14:10 +0100 11/12/09, Thomas Fritz wrote:
&lt;br&gt;&amp;gt;I want to use launchd to mount an encrypted dmg image which contains 
&lt;br&gt;&amp;gt;my home directory (AES 256 - enterprise encryption guidelines ) and 
&lt;br&gt;&amp;gt;other directories i want to encrypt like /tmp, etc ...
&lt;br&gt;&lt;br&gt;You're not going to be able to do this reliably via launchd. &amp;nbsp;The 
&lt;br&gt;problem, regardless of the hdiutil issues, is that system startup is 
&lt;br&gt;asynchronous, with implicit dependency tracking via service 
&lt;br&gt;provision. &amp;nbsp;Thus, if you put your hdiutil stuff is a launchd daemon, 
&lt;br&gt;there's no guarantee that daemon will run /before/ the user has 
&lt;br&gt;logged in, because the login process does not use any of the services 
&lt;br&gt;provided by your daemon.
&lt;br&gt;&lt;br&gt;The best solution to this problem IMO would be to structure your code 
&lt;br&gt;as a login agent. &amp;nbsp;This has a couple of benefits:
&lt;br&gt;&lt;br&gt;o It runs synchronously with respect to login.
&lt;br&gt;&lt;br&gt;o You can access the password that the user provided for login.
&lt;br&gt;&lt;br&gt;o You can access the GUI, if necessary, to request a password.
&lt;br&gt;&lt;br&gt;For more details on this, see TN2228 &amp;quot;Running At Login&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://developer.apple.com/mac/library/technotes/tn2008/tn2228.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.apple.com/mac/library/technotes/tn2008/tn2228.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;S+E
&lt;br&gt;-- 
&lt;br&gt;Quinn &amp;quot;The Eskimo!&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&lt;a href=&quot;http://www.apple.com/developer/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/developer/&lt;/a&gt;&amp;gt;
&lt;br&gt;Apple Developer Relations, Developer Technical Support, Core OS/Hardware
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26775224&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-and-hdiutils-tp26744049p26775224.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26773770</id>
	<title>Re: multiple commands in one launchd item</title>
	<published>2009-12-13T23:07:01Z</published>
	<updated>2009-12-13T23:07:01Z</updated>
	<author>
		<name>Damien Sorresso</name>
	</author>
	<content type="html">On Dec 13, 2009, at 8:05 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26773770&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev.admin@...&lt;/a&gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Just spent *hours* experimenting with this and although it
&lt;br&gt;&amp;gt; is possible to add several commands into a LaunchDaemon using
&lt;br&gt;&amp;gt; the previously mention ProgramArguments from Damien
&lt;br&gt;&amp;gt; i.e. /bin/bash -c *code* as separate items, you can only use
&lt;br&gt;&amp;gt; one item line for the entire script. It's not long before it
&lt;br&gt;&amp;gt; becomes unreadable.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; All-in all, as Nehemiah mentioned, if it can go into a script,
&lt;br&gt;&amp;gt; it probably should go into a script.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; However, all LaunchDaemon external scripts should have the same
&lt;br&gt;&amp;gt; level of permissions as a LaunchDaemon plist file. Otherwise
&lt;br&gt;&amp;gt; it's a potential security threat. The contents of the external
&lt;br&gt;&amp;gt; file could be changed to whatever.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; The owner/group should be root/wheel and the mode 0755.
&lt;/div&gt;&lt;br&gt;launchd will enforce the required ownership.
&lt;br&gt;-- 
&lt;br&gt;Damien Sorresso
&lt;br&gt;BSD Engineering
&lt;br&gt;Apple Inc.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26773770&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26772767p26773770.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26772767</id>
	<title>multiple commands in one launchd item</title>
	<published>2009-12-13T20:05:02Z</published>
	<updated>2009-12-13T20:05:02Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Just spent *hours* experimenting with this and although it
&lt;br&gt;is possible to add several commands into a LaunchDaemon using
&lt;br&gt;the previously mention ProgramArguments from Damien
&lt;br&gt;i.e. /bin/bash -c *code* as separate items, you can only use
&lt;br&gt;one item line for the entire script. It's not long before it
&lt;br&gt;becomes unreadable.
&lt;br&gt;&lt;br&gt;All-in all, as Nehemiah mentioned, if it can go into a script,
&lt;br&gt;it probably should go into a script.
&lt;br&gt;&lt;br&gt;However, all LaunchDaemon external scripts should have the same
&lt;br&gt;level of permissions as a LaunchDaemon plist file. Otherwise
&lt;br&gt;it's a potential security threat. The contents of the external
&lt;br&gt;file could be changed to whatever.
&lt;br&gt;&lt;br&gt;The owner/group should be root/wheel and the mode 0755.
&lt;br&gt;&lt;br&gt;A.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26772767&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26772767p26772767.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26771177</id>
	<title>multiple commands in one launchd item</title>
	<published>2009-12-13T16:00:54Z</published>
	<updated>2009-12-13T16:00:54Z</updated>
	<author>
		<name>Nehemiah Dacres-2</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;&lt;br&gt;For example, this will work in a shell, as a one liner:&lt;br&gt;
cd /Users/me/Desktop; mkdir zzzzzzzz; cd zzzzzzzz; touch test; chown&lt;br&gt;
0:0 test; rm -rf /Users/me/Desktop/zzzzzzzz;&lt;br&gt;
&lt;br&gt;&lt;/blockquote&gt;&lt;/div&gt;if it works in the shell, try putting it in a shell script. I dont think that&amp;#39;s how Launchd is supposed to work &lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;&lt;br&gt;&amp;quot;lalalalala! it&amp;#39;s not broken because I can use it&amp;quot;&lt;br&gt;
&lt;br&gt;&lt;a href=&quot;http://linux.slashdot.org/comments.pl?sid=194281&amp;amp;threshold=1&amp;amp;commentsort=0&amp;amp;mode=thread&amp;amp;cid=15927703&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linux.slashdot.org/comments.pl?sid=194281&amp;amp;threshold=1&amp;amp;commentsort=0&amp;amp;mode=thread&amp;amp;cid=15927703&lt;/a&gt;&lt;br&gt;

&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26771177&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26771177p26771177.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26770952</id>
	<title>Re: multiple command lines in launchd.</title>
	<published>2009-12-13T15:33:00Z</published>
	<updated>2009-12-13T15:33:00Z</updated>
	<author>
		<name>Damien Sorresso</name>
	</author>
	<content type="html">On Dec 13, 2009, at 3:25 PM, Scott Haneda wrote:
&lt;br&gt;&amp;gt; On Dec 13, 2009, at 2:46 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770952&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev.admin@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; stumbled across a book (in google) that gives you
&lt;br&gt;&amp;gt;&amp;gt; can example of just this. Haven't tried it, but I'm
&lt;br&gt;&amp;gt;&amp;gt; having the same problem with something else.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; What are you getting stuck on specifically? One thing I've never gotten to work, even as a single command, is any form of redirection command. 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; So 'echo &amp;quot;something&amp;quot; &amp;gt;&amp;gt; /tmp/testfile' has never worked at al. I just get an exit code in syslog. 
&lt;br&gt;&lt;br&gt;launchd is not a shell intepreter. &amp;quot;&amp;gt;&amp;gt;&amp;quot; is just another string to it. If you want to redirect a job's stdout, you should use the StandardOutPath plist key. Were your job a typical launchd job (with a shell script on-disk that was executed), this wouldn't be a problem.
&lt;br&gt;&lt;br&gt;&amp;gt; If anyone has specific data on how to best debug these cases, and get more verbosity in the logs, I would love to know how. 
&lt;br&gt;&lt;br&gt;`sudo launchctl log level debug`
&lt;br&gt;&lt;br&gt;Then edit your /etc/syslog.conf file, changing the first line from
&lt;br&gt;&lt;br&gt;&amp;gt; *.notice;authpriv,remoteauth,ftp,install,internal.none	/var/log/system.log
&lt;br&gt;&lt;br&gt;to 
&lt;br&gt;&lt;br&gt;&amp;gt; *.debug;authpriv,remoteauth,ftp,install,internal.none	/var/log/system.log
&lt;br&gt;&lt;br&gt;&lt;br&gt;Then `sudo killall -HUP syslogd`. Note that this will dump a *ton* of stuff into your syslog. 
&lt;br&gt;&lt;br&gt;But in your case, extra logging won't help. There's no bug in launchd here.
&lt;br&gt;-- 
&lt;br&gt;Damien Sorresso
&lt;br&gt;BSD Engineering
&lt;br&gt;Apple Inc.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770952&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-multiple-command-lines-in-launchd.-tp26770583p26770952.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26770895</id>
	<title>Re: multiple command lines in launchd.</title>
	<published>2009-12-13T15:25:22Z</published>
	<updated>2009-12-13T15:25:22Z</updated>
	<author>
		<name>Scott Haneda-3</name>
	</author>
	<content type="html">&lt;html&gt;&lt;body bgcolor=&quot;#FFFFFF&quot;&gt;&lt;div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); &quot;&gt;On Dec 13, 2009, at 2:46 PM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770895&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;dev.admin@...&lt;/a&gt; wrote:&lt;/span&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;span&gt; stumbled across a book (in google) that gives you&lt;/span&gt;&lt;br&gt;&lt;span&gt;can example of just this. Haven't tried it, but I'm&lt;/span&gt;&lt;br&gt;&lt;span&gt;having the same problem with something else.&lt;/span&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What are you getting stuck on specifically? One thing I've never gotten to work, even as a single command, is any form of redirection command.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;So 'echo &quot;something&quot; &amp;gt;&amp;gt; /tmp/testfile' has never worked at al. I just get an exit code in syslog.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If anyone has specific data on how to best debug these cases, and get more verbosity in the logs, I would love to know how.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I've resisted just using cron for as long as I can, what was easy and &quot;just worked&quot; in cron, can be a little hit or miss with launchd.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I do love to more granular control over time and other events that can act as the trigger for the work I am asking launchd to do. That's a huge win over cron. Triggers based on a file changing, that took a lot of duct tape to work with cron. &amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;The link to the book is:&lt;/span&gt;&lt;br&gt;&lt;span&gt;&lt;a href=&quot;http://books.google.com/books?id=OoTAWXH6z48C&amp;amp;pg=PT468&amp;amp;dq=launchd&amp;amp;cd=8#v=onepage&amp;amp;q=launchd&amp;amp;f=false&quot; x-apple-data-detectors=&quot;true&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;&lt;a href=&quot;http://books.google.com/books?id=OoTAWXH6z48C&amp;amp;pg=PT468&amp;amp;dq=launchd&amp;amp;cd=8#v=onepage&amp;amp;q=launchd&amp;amp;f=false&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://books.google.com/books?id=OoTAWXH6z48C&amp;amp;pg=PT468&amp;amp;dq=launchd&amp;amp;cd=8#v=onepage&amp;amp;q=launchd&amp;amp;f=false&lt;/a&gt;&lt;/a&gt;&lt;/span&gt;&lt;br&gt;&lt;span&gt;&lt;/span&gt;&lt;br&gt;&lt;span&gt;If that doesn't work then search for 'launchd' and the&lt;/span&gt;&lt;br&gt;&lt;span&gt;book called Enterprise Mac Administrators Guide page&lt;/span&gt;&lt;br&gt;&lt;span&gt;452 to 453, Self-destructing scripts.&lt;/span&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you! I will take a look at those resources shortly and report back.&amp;nbsp;&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;span&gt;Although I can't confirm this yet, I *think* you can&lt;/span&gt;&lt;br&gt;&lt;span&gt;put an entire line on each item terminated with a&lt;/span&gt;&lt;br&gt;&lt;span&gt;semi-colon.&lt;/span&gt;&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Duh, why did I never think about that method. I mostly use other plist files to learn. Since I've only seen multi-command statements as seoarate strings in the array, one for each command, I never thought to combine them.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;blockquote type=&quot;cite&quot;&gt;&lt;span&gt;If you do get it to work, confirmation on this list&lt;/span&gt;&lt;br&gt;&lt;span&gt;would be appreciated.&lt;/span&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;For sure. Whatever I discover I will report back here.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you for you research and suggestions. &amp;nbsp;&lt;/div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-tap-highlight-color: rgba(26, 26, 26, 0.296875); -webkit-composition-fill-color: rgba(175, 192, 227, 0.230469); -webkit-composition-frame-color: rgba(77, 128, 180, 0.230469); &quot;&gt;&lt;div&gt;--&amp;nbsp;&lt;/div&gt;&lt;div&gt;Scott&lt;/div&gt;Iphone says hello.&lt;/span&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770895&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-multiple-command-lines-in-launchd.-tp26770583p26770895.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26770736</id>
	<title>Re: multiple commands in one launchd item</title>
	<published>2009-12-13T15:07:07Z</published>
	<updated>2009-12-13T15:07:07Z</updated>
	<author>
		<name>Damien Sorresso</name>
	</author>
	<content type="html">On Dec 12, 2009, at 6:46 PM, Scott Haneda wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; If I can run a command in the terminal, should it also be possible to put that entire command into a launchhd plist?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; For example, this will work in a shell, as a one liner:
&lt;br&gt;&amp;gt; cd /Users/me/Desktop; mkdir zzzzzzzz; cd zzzzzzzz; touch test; chown 0:0 test; rm -rf /Users/me/Desktop/zzzzzzzz;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Putting that into a plist, I get errors to syslog:
&lt;br&gt;&amp;gt; Dec 12 18:37:23 macbook com.test.me.test.foo[1596]: /usr/bin/cd: line 4: cd: /Users/me/Desktop;: No such file or directory
&lt;br&gt;&amp;gt; Dec 12 18:37:23 macbook com.apple.launchd[1] (com.test.me.test.foo[1596]): Exited with exit code: 1
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Here is how I have tried it:
&lt;br&gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;dict&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;string&amp;gt;com.test.me.test.foo&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;array&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;/Users/me/Desktop;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;mkdir&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;touch&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;chown&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;0:0&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;rm&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;-rf&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 		&amp;lt;string&amp;gt;/Users/me/Desktop/zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;/array&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;true/&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; 	&amp;lt;integer&amp;gt;10&amp;lt;/integer&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/plist&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have also tried removing the &amp;quot;;&amp;quot; terminator, and reloading, that does not seem to work either. &amp;nbsp;I am resoting to shoving these commands into a shell script, which launchd will then call. &amp;nbsp;This works, but is one more file I need to manage, and wold love to be able to manage this in one launchd file.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My goal, it to have a schedule, once every 5 minutes, it will chown 0:0 a file, and set the executable bit on it. &amp;nbsp;So something like cd /Users/me/.hidden; chown 0:0 .runner; chmod +x .runner;
&lt;/div&gt;&lt;br&gt;Several things. Firstly, launchd is not a shell interpreter, so please don't assume that it acts like one or makes the same guarantees. launchd jobs consist of a plist describing the job and an executable file that will be run. This is our model, and your deployment scenario clearly allows for you being able to install a plist into /Library/LaunchDaemons, so there's no reason you couldn't also deploy a shell script to, say, /usr/local/bin.
&lt;br&gt;&lt;br&gt;Secondly, you're doing yourself a disservice by putting the commands in the launchd.plist directly, because you are forcing yourself to reload the plist every time you make a change to the embedded script. If you just point to an executable file on-disk, you can change it to your heart's content without ever having to reload the launchd job.
&lt;br&gt;&lt;br&gt;Thirdly, you should be specifying the full paths to these commands in your shell script or guaranteeing that your PATH is sanitized, just as a matter of best practices. This kind of sanitation is much easier to accomplish in a single shell script file. (Remember, launchd doesn't make any guarantees about what its PATH is or what PATH its jobs will inherit.)
&lt;br&gt;&lt;br&gt;Fourthly, you're clearly working with your own user account here, so this job should be an agent, not a daemon, so that the files you create are created with the proper ownership and permissions.
&lt;br&gt;&lt;br&gt;Lastly, if you're absolutely dead-set on doing things this way, you have to again remember that launchd is not a shell interpreter, so those commands have no syntactical meaning to it. It just sees &amp;quot;/Users/me/Desktop;&amp;quot; and copies *that entire string* as the argument. Since it's not a shell interpreter, the ending semi-colon doesn't carry any meaning. It's just the second argument you want passed into an execve(3) call with &amp;quot;cd&amp;quot; as its first argument.
&lt;br&gt;&lt;br&gt;What you should be doing is specifying a Program pointing to the shell of your choice (i.e. &amp;quot;/bin/bash&amp;quot;), followed by the appropriate flag to ask the shell to interpret the argument following as a script (&amp;quot;-c&amp;quot; for bash).
&lt;br&gt;-- 
&lt;br&gt;Damien Sorresso
&lt;br&gt;BSD Engineering
&lt;br&gt;Apple Inc.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770736&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26763180p26770736.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26770583</id>
	<title>Re: multiple command lines in launchd.</title>
	<published>2009-12-13T14:46:46Z</published>
	<updated>2009-12-13T14:46:46Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Hi Scott,
&lt;br&gt;&lt;br&gt;I stumbled across a book (in google) that gives you
&lt;br&gt;can example of just this. Haven't tried it, but I'm
&lt;br&gt;having the same problem with something else.
&lt;br&gt;&lt;br&gt;The link to the book is:
&lt;br&gt;&lt;a href=&quot;http://books.google.com/books&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://books.google.com/books&lt;/a&gt;? 
&lt;br&gt;id=OoTAWXH6z48C&amp;pg=PT468&amp;dq=launchd&amp;cd=8#v=onepage&amp;q=launchd&amp;f=false
&lt;br&gt;&lt;br&gt;If that doesn't work then search for 'launchd' and the
&lt;br&gt;book called Enterprise Mac Administrators Guide page
&lt;br&gt;452 to 453, Self-destructing scripts.
&lt;br&gt;&lt;br&gt;Although I can't confirm this yet, I *think* you can
&lt;br&gt;put an entire line on each item terminated with a
&lt;br&gt;semi-colon.
&lt;br&gt;&lt;br&gt;If you do get it to work, confirmation on this list
&lt;br&gt;would be appreciated.
&lt;br&gt;&lt;br&gt;A.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26770583&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-multiple-command-lines-in-launchd.-tp26770583p26770583.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26763180</id>
	<title>multiple commands in one launchd item</title>
	<published>2009-12-12T18:46:55Z</published>
	<updated>2009-12-12T18:46:55Z</updated>
	<author>
		<name>Scott Haneda-3</name>
	</author>
	<content type="html">If I can run a command in the terminal, should it also be possible to &amp;nbsp;
&lt;br&gt;put that entire command into a launchhd plist?
&lt;br&gt;&lt;br&gt;For example, this will work in a shell, as a one liner:
&lt;br&gt;cd /Users/me/Desktop; mkdir zzzzzzzz; cd zzzzzzzz; touch test; chown &amp;nbsp;
&lt;br&gt;0:0 test; rm -rf /Users/me/Desktop/zzzzzzzz;
&lt;br&gt;&lt;br&gt;Putting that into a plist, I get errors to syslog:
&lt;br&gt;Dec 12 18:37:23 macbook com.test.me.test.foo[1596]: /usr/bin/cd: line &amp;nbsp;
&lt;br&gt;4: cd: /Users/me/Desktop;: No such file or directory
&lt;br&gt;Dec 12 18:37:23 macbook com.apple.launchd[1] &amp;nbsp;
&lt;br&gt;(com.test.me.test.foo[1596]): Exited with exit code: 1
&lt;br&gt;&lt;br&gt;Here is how I have tried it:
&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;com.test.me.test.foo&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/Users/me/Desktop;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;mkdir&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;cd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;touch&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;chown&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;0:0&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;test;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;rm&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;-rf&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/Users/me/Desktop/zzzzzzzz;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;true/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;StartInterval&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;integer&amp;gt;10&amp;lt;/integer&amp;gt;
&lt;br&gt;&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/plist&amp;gt;
&lt;br&gt;&lt;br&gt;I have also tried removing the &amp;quot;;&amp;quot; terminator, and reloading, that &amp;nbsp;
&lt;br&gt;does not seem to work either. &amp;nbsp;I am resoting to shoving these commands &amp;nbsp;
&lt;br&gt;into a shell script, which launchd will then call. &amp;nbsp;This works, but is &amp;nbsp;
&lt;br&gt;one more file I need to manage, and wold love to be able to manage &amp;nbsp;
&lt;br&gt;this in one launchd file.
&lt;br&gt;&lt;br&gt;My goal, it to have a schedule, once every 5 minutes, it will chown &amp;nbsp;
&lt;br&gt;0:0 a file, and set the executable bit on it. &amp;nbsp;So something like cd / 
&lt;br&gt;Users/me/.hidden; chown 0:0 .runner; chmod +x .runner;
&lt;br&gt;&lt;br&gt;Thanks for any help.
&lt;br&gt;-- 
&lt;br&gt;Scott * If you contact me off list replace talklists@ with scott@ *
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26763180&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/multiple-commands-in-one-launchd-item-tp26763180p26763180.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26749723</id>
	<title>Re: launchd and hdiutils</title>
	<published>2009-12-11T10:53:03Z</published>
	<updated>2009-12-11T10:53:03Z</updated>
	<author>
		<name>Damien Sorresso</name>
	</author>
	<content type="html">On Dec 11, 2009, at 5:10 AM, Thomas Fritz wrote:
&lt;br&gt;&amp;gt; Hi everybody
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I want to use launchd to mount an encrypted dmg image which contains my home directory (AES 256 - enterprise encryption guidelines ) and other directories i want to encrypt like /tmp, etc ... 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Therefore i created a launchd.plist which starts hdiutils to attach the image. To be able to enter the password, i directed stdin, stderr and stdout to /dev/console.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Furthermore i modified com.apple.loginwindow.plist to wait until the image is mounted.
&lt;br&gt;&lt;br&gt;Why not just use FileVault?
&lt;br&gt;&lt;br&gt;&amp;gt; Everything seems to work but after I logged in, the images isn't mounted anymore.
&lt;br&gt;&lt;br&gt;It sounds like you mounted the image from a daemon, which runs in a different environment from your user environment. Though I honestly don't know much about how the disk images subsystem works.
&lt;br&gt;&lt;br&gt;&amp;gt; Does anyone has an idea how to solve this problem ?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; By the way, which key derivation algorithm is used to derive the encryption key from the password. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Try apple-cdsa.
&lt;br&gt;-- 
&lt;br&gt;Damien Sorresso
&lt;br&gt;BSD Engineering
&lt;br&gt;Apple Inc.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26749723&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-and-hdiutils-tp26744049p26749723.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26745840</id>
	<title>launchd and hdiutils</title>
	<published>2009-12-11T07:07:27Z</published>
	<updated>2009-12-11T07:07:27Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Hi Tomasz,
&lt;br&gt;&lt;br&gt;Have you considered adding the dmg file to the
&lt;br&gt;Preferences -&amp;gt; Accounts -&amp;gt; Login Items
&lt;br&gt;It should launch the decompression application
&lt;br&gt;and request a password all in the gui.
&lt;br&gt;&lt;br&gt;Alternatively you may want to consider using
&lt;br&gt;the built in File Vault facility specifically
&lt;br&gt;design for Home directory security.
&lt;br&gt;&lt;br&gt;As far as launchd is concerned, you maybe
&lt;br&gt;pushing it's capabilities. The /tmp directory,
&lt;br&gt;I believe, only contains temporary items that
&lt;br&gt;are removed at the end of the session.
&lt;br&gt;&lt;br&gt;A.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26745840&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-and-hdiutils-tp26745840p26745840.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26744049</id>
	<title>launchd and hdiutils</title>
	<published>2009-12-11T05:10:43Z</published>
	<updated>2009-12-11T05:10:43Z</updated>
	<author>
		<name>Thomas Fritz-7</name>
	</author>
	<content type="html">Hi everybody
&lt;br&gt;&lt;br&gt;I want to use launchd to mount an encrypted dmg image which contains my home directory (AES 256 - enterprise encryption guidelines ) and other directories i want to encrypt like /tmp, etc ... 
&lt;br&gt;&lt;br&gt;Therefore i created a launchd.plist which starts hdiutils to attach the image. To be able to enter the password, i directed stdin, stderr and stdout to /dev/console.
&lt;br&gt;&lt;br&gt;Furthermore i modified com.apple.loginwindow.plist to wait until the image is mounted.
&lt;br&gt;&lt;br&gt;Everything seems to work but after I logged in, the images isn't mounted anymore.
&lt;br&gt;&lt;br&gt;Does anyone has an idea how to solve this problem ?
&lt;br&gt;&lt;br&gt;By the way, which key derivation algorithm is used to derive the encryption key from the password. 
&lt;br&gt;&lt;br&gt;&lt;br&gt;Kind regards
&lt;br&gt;&lt;br&gt;Thomas Fritz
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26744049&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-and-hdiutils-tp26744049p26744049.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26720705</id>
	<title>launchd stdin</title>
	<published>2009-12-09T17:20:41Z</published>
	<updated>2009-12-09T17:20:41Z</updated>
	<author>
		<name>Nehemiah Dacres-2</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;Would it be possible to direct stdin to the keyboard to enable interactive daemons, e.g. for entering the password of an encryption tool.&lt;br&gt;

&lt;br&gt;
This would allow to use truecrypt to encrypt the home folder, swap, /tmp, ....&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;im not sure if that&amp;#39;s possible, launchd programs are launched before your GUI launches.  &lt;/div&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
&lt;br&gt;
Best regards&lt;br&gt;
&lt;br&gt;
Thomas&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
------------------------------&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
launchd-dev mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26720705&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
End of launchd-dev Digest, Vol 30, Issue 1&lt;br&gt;
******************************************&lt;br&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;&lt;br&gt;&amp;quot;lalalalala! it&amp;#39;s not broken because I can use it&amp;quot;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://linux.slashdot.org/comments.pl?sid=194281&amp;amp;threshold=1&amp;amp;commentsort=0&amp;amp;mode=thread&amp;amp;cid=15927703&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://linux.slashdot.org/comments.pl?sid=194281&amp;amp;threshold=1&amp;amp;commentsort=0&amp;amp;mode=thread&amp;amp;cid=15927703&lt;/a&gt;&lt;br&gt;

&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26720705&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-stdin-tp26720705p26720705.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26719224</id>
	<title>Re: Loginwindow Hook alternatives?</title>
	<published>2009-12-09T14:56:33Z</published>
	<updated>2009-12-09T14:56:33Z</updated>
	<author>
		<name>Quinn-9</name>
	</author>
	<content type="html">At 23:49 +0100 9/12/09, Mike Fischer wrote:
&lt;br&gt;&amp;gt;What would be the preferred way to handle something like this for 
&lt;br&gt;&amp;gt;10.5+ as well as 10.6+?
&lt;br&gt;&lt;br&gt;&amp;lt;&lt;a href=&quot;http://developer.apple.com/mac/library/technotes/tn2008/tn2228.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.apple.com/mac/library/technotes/tn2008/tn2228.html&lt;/a&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;S+E
&lt;br&gt;-- 
&lt;br&gt;Quinn &amp;quot;The Eskimo!&amp;quot; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;&lt;a href=&quot;http://www.apple.com/developer/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/developer/&lt;/a&gt;&amp;gt;
&lt;br&gt;Apple Developer Relations, Developer Technical Support, Core OS/Hardware
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26719224&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Loginwindow-Hook-alternatives--tp26719145p26719224.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26719145</id>
	<title>Loginwindow Hook alternatives?</title>
	<published>2009-12-09T14:49:28Z</published>
	<updated>2009-12-09T14:49:28Z</updated>
	<author>
		<name>Mike Fischer-4</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;In an enterprise setting I need to run an shell script after a (any) &amp;nbsp;
&lt;br&gt;user logs in. This shell script needs to know the user name and it &amp;nbsp;
&lt;br&gt;needs to be able to do certain root/admin-only tasks, e.g. chown(8), &amp;nbsp;
&lt;br&gt;even for non-priveledged users.
&lt;br&gt;&lt;br&gt;Loginwindow Hooks are described here and apart from some minor typos &amp;nbsp;
&lt;br&gt;in the KB seem to fit the bill:
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://support.apple.com/kb/HT2420&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://support.apple.com/kb/HT2420&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://developer.apple.com/mac/library/documentation/MacOSX/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.apple.com/mac/library/documentation/MacOSX/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;Conceptual/BPSystemStartup/Articles/CustomLogin.html&amp;gt;
&lt;br&gt;&lt;br&gt;The only alternative I can think of would be a launchd agent calling &amp;nbsp;
&lt;br&gt;a setuid script. While the security would not really be worse than &amp;nbsp;
&lt;br&gt;that of a Loginwindow Hook script, I don't like the combination of &amp;nbsp;
&lt;br&gt;setuid and shell script.
&lt;br&gt;&lt;br&gt;OTOH Loginwindow Hooks are kind of fragile because there can be only &amp;nbsp;
&lt;br&gt;one of then.
&lt;br&gt;&lt;br&gt;&lt;br&gt;What would be the preferred way to handle something like this for 10.5 
&lt;br&gt;+ as well as 10.6+?
&lt;br&gt;&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;Mike
&lt;br&gt;-- 
&lt;br&gt;Mike Fischer &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Softwareentwicklung, EDV-Beratung
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Schulung, Vertrieb
&lt;br&gt;Web: &amp;lt;&lt;a href=&quot;http://homepage.mac.com/mike_fischer/index.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://homepage.mac.com/mike_fischer/index.html&lt;/a&gt;&amp;gt;
&lt;br&gt;Note: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; I read this list in digest mode!
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Send me a private copy for faster responses.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26719145&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Loginwindow-Hook-alternatives--tp26719145p26719145.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26692002</id>
	<title>launchd stdin</title>
	<published>2009-12-08T02:51:45Z</published>
	<updated>2009-12-08T02:51:45Z</updated>
	<author>
		<name>Thomas Fritz-7</name>
	</author>
	<content type="html">Hi everybody
&lt;br&gt;&lt;br&gt;Would it be possible to direct stdin to the keyboard to enable interactive daemons, e.g. for entering the password of an encryption tool.
&lt;br&gt;&lt;br&gt;This would allow to use truecrypt to encrypt the home folder, swap, /tmp, ....
&lt;br&gt;&lt;br&gt;Best regards
&lt;br&gt;&lt;br&gt;Thomas
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26692002&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd-stdin-tp26692002p26692002.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26537500</id>
	<title>feature request - determine if a port/socket has been created/opened.</title>
	<published>2009-11-26T19:19:44Z</published>
	<updated>2009-11-26T19:19:44Z</updated>
	<author>
		<name>dev.admin</name>
	</author>
	<content type="html">Dev,
&lt;br&gt;&lt;br&gt;Impressive as launchd is, I would like to suggest
&lt;br&gt;a feature request.
&lt;br&gt;&lt;br&gt;Recently, I was looking into the possibilities of
&lt;br&gt;writing a LaunchDaemon that would essentially be
&lt;br&gt;a first line of defense against trojans, with
&lt;br&gt;minimal disruption and maximum effectiveness. In
&lt;br&gt;essence a launchd firewall.
&lt;br&gt;&lt;br&gt;The idea was to monitor if a list of ports were
&lt;br&gt;opened and if they were, then to ideally close the
&lt;br&gt;port, or alternatively, down the network connection.
&lt;br&gt;&lt;br&gt;Originally, I tried using the Sockets -&amp;gt; Listeners
&lt;br&gt;properties but that just created sockets which then
&lt;br&gt;forced a network down state.
&lt;br&gt;&lt;br&gt;In this particular example, I would require launchd
&lt;br&gt;to be able to monitor whether a port or list of ports
&lt;br&gt;were opened and then to initiate a response. Keeping
&lt;br&gt;with current syntax, an extension to the Sockets
&lt;br&gt;property with 'Monitors' or something similar.
&lt;br&gt;&lt;br&gt;I can appreciate that this request is diluting the
&lt;br&gt;original intention of launchd, but I've communicated
&lt;br&gt;with other users and it seems to be that others are
&lt;br&gt;finding uses for launchd beyond it's original purpose.
&lt;br&gt;&lt;br&gt;Andrew.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26537500&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/feature-request---determine-if-a-port-socket-has-been-created-opened.-tp26537500p26537500.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26341769</id>
	<title>Re: A few pointers at a launchd script</title>
	<published>2009-11-13T11:05:13Z</published>
	<updated>2009-11-13T11:05:13Z</updated>
	<author>
		<name>Panagiotis Atmatzidis-2</name>
	</author>
	<content type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;Hello,&lt;/div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;On 13 Νοε 2009, at 7:52 μ.μ., Brent Gulanowski wrote:&lt;/div&gt;&lt;br class=&quot;Apple-interchange-newline&quot;&gt;&lt;blockquote type=&quot;cite&quot;&gt;OnDemand has been replaced with KeepAlive, which can be a boolean (inverse of what OnDemand would be) or a dictionary. So I think you should remove the OnDemand and RunAtLoad keys and replace them with:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
&amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;dictionary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;NetworkState&amp;gt;&amp;lt;true/&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/dictionary&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In any case, the NetworkState key is not meaningful except in a KeepAlive dictionary, based on my reading of the man page for launchd.plist.&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks for pointing that out. I'll take a look when I have the time and change it.&lt;/div&gt;&lt;br&gt;&lt;blockquote type=&quot;cite&quot;&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 30, 2009 at 5:31 PM, Panagiotis Atmatzidis &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26341769&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
I'm forwarding a message that I posted a few minutes ago at users-macports ML because I just found this mailing list and I think that it's more apropriate... (and a good one to keep an eye to avoid launchd adventures..)&lt;br&gt;

&lt;br&gt;
--&lt;br&gt;
Greetings,&lt;br&gt;
&lt;br&gt;
I've created my first launchd script. It's for OpenVPN2. Here are the files I've created so far:&lt;br&gt;
&lt;br&gt;
devo:/opt/local/etc/LaunchDaemons root# ls -l org.macports.OpenVPN2/&lt;br&gt;
total 16&lt;br&gt;
-rwxr-xr-x &amp;nbsp; 1 root &amp;nbsp;admin &amp;nbsp; 957 Oct 30 23:06 OpenVPN2.wrapper&lt;br&gt;
-rw-r--r-- &amp;nbsp; 1 root &amp;nbsp;admin &amp;nbsp;1026 Oct 30 23:39 org.macports.OpenVPN2.plist&lt;br&gt;
&lt;br&gt;
The Wrapper&lt;br&gt;
-----&lt;br&gt;
#!/bin/sh&lt;br&gt;
&lt;br&gt;
. /etc/rc.common&lt;br&gt;
&lt;br&gt;
load() {&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -d /System/Library/Extensions/tun.kext ]; then&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kextload -q /System/Library/Extensions/tun.kext;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &quot;tun.kext not found in /System/Library/Extensions/&quot;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;br&gt;
&lt;br&gt;
StartService() {&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load; # first load the module&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/local/sbin/openvpn2 --config /opt/local/etc/ovpn/server.conf --writepid /opt/local/etc/ovpn/ovpn.pid --daemon OpenVPN2&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &quot;OpenVPN is loaded&quot;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; else&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &quot;tun extensions is not loaded.&quot;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
StopService() {&lt;br&gt;
&amp;nbsp;if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; kextunload /System/Library/Extensions/tun.kext # first unload the module&lt;br&gt;
&amp;nbsp;fi&lt;br&gt;
&lt;br&gt;
&amp;nbsp;pid=`cat /opt/local/etc/ovpn/ovpn.pid` # get the pid number&lt;br&gt;
&amp;nbsp;if [ $? -eq 0 ]; then&lt;br&gt;
 &amp;nbsp; kill $pid&lt;br&gt;
&amp;nbsp;fi&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
RestartService() {&lt;br&gt;
&amp;nbsp;StopService &quot;$@&quot;&lt;br&gt;
&amp;nbsp;StartService &quot;$@&quot;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
RunService &quot;$1&quot;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
the .plist which is an: ln -sf /opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/org.macports.OpenVPN2.plist /Library/LaunchDaemons/....&lt;br&gt;
------------------------&lt;br&gt;
&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&lt;br&gt;
&amp;lt;!DOCTYPE plist PUBLIC &quot;-//Apple Computer//DTD PLIST 1.0//EN&quot;&lt;br&gt;
&quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&quot; &amp;gt;&lt;br&gt;
&amp;lt;plist version='1.0'&amp;gt;&lt;br&gt;
&amp;lt;dict&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;org.macports.OpenVPN2&amp;lt;/string&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br&gt;
&amp;lt;array&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/bin/daemondo&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--label=OpenVPN2&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--start-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;start&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--stop-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;stop&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--restart-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;restart&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--pid=none&amp;lt;/string&amp;gt;&lt;br&gt;
&amp;lt;/array&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Debug&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Disabled&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;OnDemand&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;NetworkState&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;&lt;br&gt;
&amp;lt;/dict&amp;gt;&lt;br&gt;
&amp;lt;/plist&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
However, there are two issues that I can't seem to be able to manage right now.&lt;br&gt;
&lt;br&gt;
The first is that OpenVPN does not start at boot while the module is loaded succesfully. When I login to the system and kill daemondo, it relaunches itself and ovpn works fine. I suspect that the problem is en0. Launchd tries to launchd openvpn before en0 comes up. That's why I put the NetworkState keyword, but it does not seem to effect *any* startup script. I had issues with dnsmasq also in the recent past.&lt;br&gt;

&lt;br&gt;
The second problem with this script is that when I unload it via launchd it does not kill the process. Launchd unloads the script and (probably) will not be launchd (if -w is added) in the next boot but daemondo keeps running the process nevertheless. Is this a normal behaviour?&lt;br&gt;

&lt;br&gt;
I'm not *that* worried about the second. I'd prefer to have a solution about the first one, which is the most important for me.&lt;br&gt;
&lt;br&gt;
Best regards &amp;amp; thanks in advance&lt;br&gt;
Panagiotis (atmosx) Atmatzidis&lt;br&gt;
&lt;br&gt;
email: &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26341769&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;&lt;br&gt;
URL: &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.convalesco.org/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.convalesco.org&lt;/a&gt;&lt;br&gt;
GnuPG key id: 0xFC4E8BB4&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
--&lt;br&gt;
The wise man said: &quot;Never argue with an idiot. They bring you down to their level and beat you with experience.&quot;&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
launchd-dev mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26341769&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Brent Gulanowski&lt;br&gt;
&lt;/div&gt;
&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;div&gt;
&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; &quot;&gt;&lt;div style=&quot;word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; &quot;&gt;&lt;div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;Panagiotis (atmosx) Atmatzidis&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; min-height: 17px; &quot;&gt;&lt;br&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;email:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre; &quot;&gt;	&lt;/span&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26341769&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;URL:&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre; &quot;&gt;	&lt;/span&gt;&lt;a href=&quot;http://www.convalesco.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.convalesco.org&lt;/a&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;GnuPG key id:&amp;nbsp;0xFC4E8BB4&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;--&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 14px/normal Helvetica; &quot;&gt;The wise man said: &quot;Never argue with an idiot. They bring you down to their level and beat you with experience.&quot;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;&lt;/span&gt;
&lt;/div&gt;
&lt;br&gt;&lt;/body&gt;&lt;/html&gt;&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26341769&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/A-few-pointers-at-a-launchd-script-tp26137805p26341769.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26340619</id>
	<title>Re: A few pointers at a launchd script</title>
	<published>2009-11-13T09:52:01Z</published>
	<updated>2009-11-13T09:52:01Z</updated>
	<author>
		<name>Brent Gulanowski</name>
	</author>
	<content type="html">OnDemand has been replaced with KeepAlive, which can be a boolean (inverse of what OnDemand would be) or a dictionary. So I think you should remove the OnDemand and RunAtLoad keys and replace them with:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;
&amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;dictionary&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;NetworkState&amp;gt;&amp;lt;true/&amp;gt;&lt;/div&gt;&lt;div&gt;&amp;lt;/dictionary&amp;gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In any case, the NetworkState key is not meaningful except in a KeepAlive dictionary, based on my reading of the man page for launchd.plist.&lt;/div&gt;
&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class=&quot;gmail_quote&quot;&gt;On Fri, Oct 30, 2009 at 5:31 PM, Panagiotis Atmatzidis &lt;span dir=&quot;ltr&quot;&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26340619&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;&quot;&gt;
I&amp;#39;m forwarding a message that I posted a few minutes ago at users-macports ML because I just found this mailing list and I think that it&amp;#39;s more apropriate... (and a good one to keep an eye to avoid launchd adventures..)&lt;br&gt;

&lt;br&gt;
--&lt;br&gt;
Greetings,&lt;br&gt;
&lt;br&gt;
I&amp;#39;ve created my first launchd script. It&amp;#39;s for OpenVPN2. Here are the files I&amp;#39;ve created so far:&lt;br&gt;
&lt;br&gt;
devo:/opt/local/etc/LaunchDaemons root# ls -l org.macports.OpenVPN2/&lt;br&gt;
total 16&lt;br&gt;
-rwxr-xr-x   1 root  admin   957 Oct 30 23:06 OpenVPN2.wrapper&lt;br&gt;
-rw-r--r--   1 root  admin  1026 Oct 30 23:39 org.macports.OpenVPN2.plist&lt;br&gt;
&lt;br&gt;
The Wrapper&lt;br&gt;
-----&lt;br&gt;
#!/bin/sh&lt;br&gt;
&lt;br&gt;
. /etc/rc.common&lt;br&gt;
&lt;br&gt;
load() {&lt;br&gt;
               if [ -d /System/Library/Extensions/tun.kext ]; then&lt;br&gt;
                       kextload -q /System/Library/Extensions/tun.kext;&lt;br&gt;
               else&lt;br&gt;
                       echo &amp;quot;tun.kext not found in /System/Library/Extensions/&amp;quot;&lt;br&gt;
               fi&lt;br&gt;
       }&lt;br&gt;
&lt;br&gt;
StartService() {&lt;br&gt;
               load; # first load the module&lt;br&gt;
               if [[ $( kextstat -l | grep -q &amp;#39;tun&amp;#39; )$? == 0 ]]; then&lt;br&gt;
               /opt/local/sbin/openvpn2 --config /opt/local/etc/ovpn/server.conf --writepid /opt/local/etc/ovpn/ovpn.pid --daemon OpenVPN2&lt;br&gt;
                               /usr/bin/logger &amp;quot;OpenVPN is loaded&amp;quot;&lt;br&gt;
       else&lt;br&gt;
                               /usr/bin/logger &amp;quot;tun extensions is not loaded.&amp;quot;&lt;br&gt;
               fi&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
StopService() {&lt;br&gt;
 if [[ $( kextstat -l | grep -q &amp;#39;tun&amp;#39; )$? == 0 ]]; then&lt;br&gt;
       kextunload /System/Library/Extensions/tun.kext # first unload the module&lt;br&gt;
 fi&lt;br&gt;
&lt;br&gt;
 pid=`cat /opt/local/etc/ovpn/ovpn.pid` # get the pid number&lt;br&gt;
 if [ $? -eq 0 ]; then&lt;br&gt;
   kill $pid&lt;br&gt;
 fi&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
RestartService() {&lt;br&gt;
 StopService &amp;quot;$@&amp;quot;&lt;br&gt;
 StartService &amp;quot;$@&amp;quot;&lt;br&gt;
}&lt;br&gt;
&lt;br&gt;
RunService &amp;quot;$1&amp;quot;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
the .plist which is an: ln -sf /opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/org.macports.OpenVPN2.plist /Library/LaunchDaemons/....&lt;br&gt;
------------------------&lt;br&gt;
&amp;lt;?xml version=&amp;#39;1.0&amp;#39; encoding=&amp;#39;UTF-8&amp;#39;?&amp;gt;&lt;br&gt;
&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot;&lt;br&gt;
&amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot; &amp;gt;&lt;br&gt;
&amp;lt;plist version=&amp;#39;1.0&amp;#39;&amp;gt;&lt;br&gt;
&amp;lt;dict&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;org.macports.OpenVPN2&amp;lt;/string&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;&lt;br&gt;
&amp;lt;array&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;/opt/local/bin/daemondo&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;--label=OpenVPN2&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;--start-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;start&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;--stop-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;stop&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;--restart-cmd&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/OpenVPN2.wrapper&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;restart&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;&lt;br&gt;
       &amp;lt;string&amp;gt;--pid=none&amp;lt;/string&amp;gt;&lt;br&gt;
&amp;lt;/array&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Debug&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;Disabled&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;OnDemand&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;&lt;br&gt;
&amp;lt;key&amp;gt;NetworkState&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;&lt;br&gt;
&amp;lt;/dict&amp;gt;&lt;br&gt;
&amp;lt;/plist&amp;gt;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
However, there are two issues that I can&amp;#39;t seem to be able to manage right now.&lt;br&gt;
&lt;br&gt;
The first is that OpenVPN does not start at boot while the module is loaded succesfully. When I login to the system and kill daemondo, it relaunches itself and ovpn works fine. I suspect that the problem is en0. Launchd tries to launchd openvpn before en0 comes up. That&amp;#39;s why I put the NetworkState keyword, but it does not seem to effect *any* startup script. I had issues with dnsmasq also in the recent past.&lt;br&gt;

&lt;br&gt;
The second problem with this script is that when I unload it via launchd it does not kill the process. Launchd unloads the script and (probably) will not be launchd (if -w is added) in the next boot but daemondo keeps running the process nevertheless. Is this a normal behaviour?&lt;br&gt;

&lt;br&gt;
I&amp;#39;m not *that* worried about the second. I&amp;#39;d prefer to have a solution about the first one, which is the most important for me.&lt;br&gt;
&lt;br&gt;
Best regards &amp;amp; thanks in advance&lt;br&gt;
Panagiotis (atmosx) Atmatzidis&lt;br&gt;
&lt;br&gt;
email:  &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26340619&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;&lt;br&gt;
URL:    &lt;a href=&quot;http://www.convalesco.org&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://www.convalesco.org&lt;/a&gt;&lt;br&gt;
GnuPG key id: 0xFC4E8BB4&lt;br&gt;&lt;font color=&quot;#888888&quot;&gt;
--&lt;br&gt;
The wise man said: &amp;quot;Never argue with an idiot. They bring you down to their level and beat you with experience.&amp;quot;&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
launchd-dev mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26340619&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;
&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear=&quot;all&quot;&gt;&lt;br&gt;-- &lt;br&gt;Brent Gulanowski&lt;br&gt;
&lt;/div&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26340619&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/A-few-pointers-at-a-launchd-script-tp26137805p26340619.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26248929</id>
	<title>Re: Setting environment variables under Snow Leopard advice.</title>
	<published>2009-11-07T07:53:11Z</published>
	<updated>2009-11-07T07:53:11Z</updated>
	<author>
		<name>Benjamin Donnachie-2</name>
	</author>
	<content type="html">For the mailing list archives in case anyone has similar issues...
&lt;br&gt;&lt;br&gt;I just tested with LimitLoadToSessionType set back to Aqua, restarted
&lt;br&gt;my system and Launchd under Snow Leopard is now behaving as it did
&lt;br&gt;under Leopard.
&lt;br&gt;&lt;br&gt;Perhaps part of the 10.6.1 update?
&lt;br&gt;&lt;br&gt;Ben
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26248929&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Setting-environment-variables-under-Snow-Leopard-advice.-tp26046987p26248929.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26141706</id>
	<title>Re: A few pointers about launchd and daemondo</title>
	<published>2009-10-31T04:51:42Z</published>
	<updated>2009-10-31T04:51:42Z</updated>
	<author>
		<name>Panagiotis Atmatzidis-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I solved both issues adjusting the wrapper accordingly. Should I throw &amp;nbsp;
&lt;br&gt;a ticket for this wrapper for this to be added on macports? I don't &amp;nbsp;
&lt;br&gt;know how to edit the port though...
&lt;br&gt;&lt;br&gt;# openvpn configuration file
&lt;br&gt;#!/bin/sh
&lt;br&gt;&lt;br&gt;. /etc/rc.common
&lt;br&gt;&lt;br&gt;load() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -d /System/Library/Extensions/tun.kext ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kextload -q /System/Library/Extensions/tun.kext;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;tun.kext not found in /System/Library/Extensions/&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;StartService() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # Use the &amp;quot;ipconfig waitall&amp;quot; command to wait for all the
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; # interfaces to come up:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; #
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ipconfig waitall
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load; # first load the module
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/opt/local/sbin/openvpn2 --config /opt/local/etc/ovpn/ 
&lt;br&gt;server.conf --writepid /opt/local/etc/ovpn/ovpn.pid --daemon OpenVPN2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;OpenVPN is loaded&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;tun extensions is not loaded.&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;StopService() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; pid=`cat /opt/local/etc/ovpn/ovpn.pid`
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ $? -eq 0 ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kill $pid
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp;		kextunload /System/Library/Extensions/tun.kext
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;The tun module is unloaded successfully&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;There was a problem. I was not able to unload tun &amp;nbsp;
&lt;br&gt;module!!!&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;		fi
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;&lt;br&gt;&lt;br&gt;}
&lt;br&gt;&lt;br&gt;RestartService() {
&lt;br&gt;&amp;nbsp; &amp;nbsp;StopService &amp;quot;$@&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp;StartService &amp;quot;$@&amp;quot;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;RunService &amp;quot;$1&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Panagiotis (atmosx) Atmatzidis
&lt;br&gt;&lt;br&gt;email:	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26141706&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;
&lt;br&gt;URL:	&lt;a href=&quot;http://www.convalesco.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.convalesco.org&lt;/a&gt;&lt;br&gt;GnuPG key id: 0xFC4E8BB4
&lt;br&gt;--
&lt;br&gt;The wise man said: &amp;quot;Never argue with an idiot. They bring you down to &amp;nbsp;
&lt;br&gt;their level and beat you with experience.&amp;quot;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26141706&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Re%3A-A-few-pointers-about-launchd-and-daemondo-tp26141706p26141706.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26137805</id>
	<title>A few pointers at a launchd script</title>
	<published>2009-10-30T15:31:23Z</published>
	<updated>2009-10-30T15:31:23Z</updated>
	<author>
		<name>Panagiotis Atmatzidis-2</name>
	</author>
	<content type="html">I'm forwarding a message that I posted a few minutes ago at users- 
&lt;br&gt;macports ML because I just found this mailing list and I think that &amp;nbsp;
&lt;br&gt;it's more apropriate... (and a good one to keep an eye to avoid &amp;nbsp;
&lt;br&gt;launchd adventures..)
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Greetings,
&lt;br&gt;&lt;br&gt;I've created my first launchd script. It's for OpenVPN2. Here are the &amp;nbsp;
&lt;br&gt;files I've created so far:
&lt;br&gt;&lt;br&gt;devo:/opt/local/etc/LaunchDaemons root# ls -l org.macports.OpenVPN2/
&lt;br&gt;total 16
&lt;br&gt;-rwxr-xr-x &amp;nbsp; 1 root &amp;nbsp;admin &amp;nbsp; 957 Oct 30 23:06 OpenVPN2.wrapper
&lt;br&gt;-rw-r--r-- &amp;nbsp; 1 root &amp;nbsp;admin &amp;nbsp;1026 Oct 30 23:39 &amp;nbsp;
&lt;br&gt;org.macports.OpenVPN2.plist
&lt;br&gt;&lt;br&gt;The Wrapper
&lt;br&gt;-----
&lt;br&gt;#!/bin/sh
&lt;br&gt;&lt;br&gt;. /etc/rc.common
&lt;br&gt;&lt;br&gt;load() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [ -d /System/Library/Extensions/tun.kext ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kextload -q /System/Library/Extensions/tun.kext;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &amp;quot;tun.kext not found in /System/Library/ 
&lt;br&gt;Extensions/&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;StartService() {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load; # first load the module
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /opt/local/sbin/openvpn2 --config /opt/local/etc/ovpn/ 
&lt;br&gt;server.conf --writepid /opt/local/etc/ovpn/ovpn.pid --daemon OpenVPN2
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;OpenVPN is loaded&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /usr/bin/logger &amp;quot;tun extensions is not &amp;nbsp;
&lt;br&gt;loaded.&amp;quot;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; fi
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;StopService() {
&lt;br&gt;&amp;nbsp; if [[ $( kextstat -l | grep -q 'tun' )$? == 0 ]]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; kextunload /System/Library/Extensions/tun.kext # first unload &amp;nbsp;
&lt;br&gt;the module
&lt;br&gt;&amp;nbsp; fi
&lt;br&gt;&lt;br&gt;&amp;nbsp; pid=`cat /opt/local/etc/ovpn/ovpn.pid` # get the pid number
&lt;br&gt;&amp;nbsp; if [ $? -eq 0 ]; then
&lt;br&gt;&amp;nbsp; &amp;nbsp; kill $pid
&lt;br&gt;&amp;nbsp; fi
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;RestartService() {
&lt;br&gt;&amp;nbsp; StopService &amp;quot;$@&amp;quot;
&lt;br&gt;&amp;nbsp; StartService &amp;quot;$@&amp;quot;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;RunService &amp;quot;$1&amp;quot;
&lt;br&gt;&lt;br&gt;&lt;br&gt;the .plist which is an: ln -sf /opt/local/etc/LaunchDaemons/ 
&lt;br&gt;org.macports.OpenVPN2/org.macports.OpenVPN2.plist /Library/ 
&lt;br&gt;LaunchDaemons/....
&lt;br&gt;------------------------
&lt;br&gt;&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple Computer//DTD PLIST 1.0//EN&amp;quot;
&lt;br&gt;&amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot; &amp;gt;
&lt;br&gt;&amp;lt;plist version='1.0'&amp;gt;
&lt;br&gt;&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;&amp;lt;string&amp;gt;org.macports.OpenVPN2&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;lt;array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/bin/daemondo&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--label=OpenVPN2&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--start-cmd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/ 
&lt;br&gt;OpenVPN2.wrapper&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;start&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--stop-cmd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/ 
&lt;br&gt;OpenVPN2.wrapper&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;stop&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--restart-cmd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/opt/local/etc/LaunchDaemons/org.macports.OpenVPN2/ 
&lt;br&gt;OpenVPN2.wrapper&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;restart&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;;&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--pid=none&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;lt;/array&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;Debug&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;Disabled&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;OnDemand&amp;lt;/key&amp;gt;&amp;lt;false/&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;NetworkState&amp;lt;/key&amp;gt;&amp;lt;true/&amp;gt;
&lt;br&gt;&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/plist&amp;gt;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;However, there are two issues that I can't seem to be able to manage &amp;nbsp;
&lt;br&gt;right now.
&lt;br&gt;&lt;br&gt;The first is that OpenVPN does not start at boot while the module is &amp;nbsp;
&lt;br&gt;loaded succesfully. When I login to the system and kill daemondo, it &amp;nbsp;
&lt;br&gt;relaunches itself and ovpn works fine. I suspect that the problem is &amp;nbsp;
&lt;br&gt;en0. Launchd tries to launchd openvpn before en0 comes up. That's why &amp;nbsp;
&lt;br&gt;I put the NetworkState keyword, but it does not seem to effect *any* &amp;nbsp;
&lt;br&gt;startup script. I had issues with dnsmasq also in the recent past.
&lt;br&gt;&lt;br&gt;The second problem with this script is that when I unload it via &amp;nbsp;
&lt;br&gt;launchd it does not kill the process. Launchd unloads the script and &amp;nbsp;
&lt;br&gt;(probably) will not be launchd (if -w is added) in the next boot but &amp;nbsp;
&lt;br&gt;daemondo keeps running the process nevertheless. Is this a normal &amp;nbsp;
&lt;br&gt;behaviour?
&lt;br&gt;&lt;br&gt;I'm not *that* worried about the second. I'd prefer to have a solution &amp;nbsp;
&lt;br&gt;about the first one, which is the most important for me.
&lt;br&gt;&lt;br&gt;Best regards &amp; thanks in advance
&lt;br&gt;Panagiotis (atmosx) Atmatzidis
&lt;br&gt;&lt;br&gt;email:	&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26137805&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;atma@...&lt;/a&gt;
&lt;br&gt;URL:	&lt;a href=&quot;http://www.convalesco.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.convalesco.org&lt;/a&gt;&lt;br&gt;GnuPG key id: 0xFC4E8BB4
&lt;br&gt;--
&lt;br&gt;The wise man said: &amp;quot;Never argue with an idiot. They bring you down to &amp;nbsp;
&lt;br&gt;their level and beat you with experience.&amp;quot;
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26137805&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/A-few-pointers-at-a-launchd-script-tp26137805p26137805.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26047260</id>
	<title>Re: Setting environment variables under Snow Leopard advice.</title>
	<published>2009-10-25T05:13:12Z</published>
	<updated>2009-10-25T05:13:12Z</updated>
	<author>
		<name>Benjamin Donnachie-2</name>
	</author>
	<content type="html">2009/10/25 Benjamin Donnachie &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26047260&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;benjamin@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; Please ignore my message!  I continued looking into it after I posted
&lt;br&gt;&amp;gt; and it works again after changing the session type to System.
&lt;br&gt;&lt;br&gt;Bit more testing and reading and it seems that background is the
&lt;br&gt;session type I needed.
&lt;br&gt;&lt;br&gt;Ben
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26047260&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Setting-environment-variables-under-Snow-Leopard-advice.-tp26046987p26047260.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26047091</id>
	<title>Re: Setting environment variables under Snow Leopard advice.</title>
	<published>2009-10-25T04:45:39Z</published>
	<updated>2009-10-25T04:45:39Z</updated>
	<author>
		<name>Benjamin Donnachie-2</name>
	</author>
	<content type="html">2009/10/25 Benjamin Donnachie &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26047091&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;benjamin@...&lt;/a&gt;&amp;gt;:
&lt;br&gt;&amp;gt; I currently use a patched version of gpg-agent under launchd control,
&lt;br&gt;&amp;gt; which previously set the necessary environment variables so that they
&lt;br&gt;&amp;gt; were accessible system-wide using IPC and SetUserEnvironment.
&lt;br&gt;&lt;br&gt;Please ignore my message! &amp;nbsp;I continued looking into it after I posted
&lt;br&gt;and it works again after changing the session type to System.
&lt;br&gt;&lt;br&gt;I think it was set to Aqua previously to ensure that Tiger systems ignored it!
&lt;br&gt;&lt;br&gt;Take care,
&lt;br&gt;&lt;br&gt;Ben
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26047091&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Setting-environment-variables-under-Snow-Leopard-advice.-tp26046987p26047091.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26046987</id>
	<title>Setting environment variables under Snow Leopard advice.</title>
	<published>2009-10-25T04:26:34Z</published>
	<updated>2009-10-25T04:26:34Z</updated>
	<author>
		<name>Benjamin Donnachie-2</name>
	</author>
	<content type="html">I currently use a patched version of gpg-agent under launchd control,
&lt;br&gt;which previously set the necessary environment variables so that they
&lt;br&gt;were accessible system-wide using IPC and SetUserEnvironment. &amp;nbsp;The
&lt;br&gt;plist looks like this:
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot;
&lt;br&gt;&amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;KeepAlive&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;true/&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;com.sourceforge.macgpg2.gpg-agent&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;/usr/local/bin/gpg-agent&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--launchd&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--use-standard-socket&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;--write-env-file&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;/array&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;LimitLoadToSessionType&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;string&amp;gt;Aqua&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;key&amp;gt;ServiceIPC&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;lt;true/&amp;gt;
&lt;br&gt;&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/plist&amp;gt;
&lt;br&gt;&lt;br&gt;This worked fine under Leopard but under Snow Leopard the environment
&lt;br&gt;variables are not being set. &amp;nbsp;I have had a look through the launchd
&lt;br&gt;source, and ServiceIPC and SetUserEnvironment are still present and
&lt;br&gt;the developer docs do not seem to cover this case. &amp;nbsp;As gpg-agent
&lt;br&gt;caches passphrases it is not suitable for running on demand. &amp;nbsp;I could
&lt;br&gt;modify the patch to accept paths from launchd but I would prefer to
&lt;br&gt;leave gpg-agent with its default behaviour and just pass the necessary
&lt;br&gt;environment variables back to Snow Leopard.
&lt;br&gt;&lt;br&gt;Consequently, I should be grateful for any advice regarding the
&lt;br&gt;correct implementation under 10.6. &amp;nbsp;Below is an extract of Stéphane
&lt;br&gt;Corthésy's gpg-agent launchd patch showing the IPC behaviour.
&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;&lt;br&gt;Ben
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;Extract from the gpg-agent launchd patch:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Pass environment variables back to launchd.
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_t resp, tmp, tmpv, msg;
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tmp = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tmpv = launch_data_new_string(strchr(infostr, '=') + 1); //
&lt;br&gt;Skip variable name and equal sign
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_dict_insert(tmp, tmpv, &amp;quot;GPG_AGENT_INFO&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_dict_insert(msg, tmp, &amp;quot;SetUserEnvironment&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resp = launch_msg(msg);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_free(msg); // Do NOT launch_data_free() on tmp, nor tmpv
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (resp)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_free(resp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_error (&amp;quot;failed to pass environment variable
&lt;br&gt;GPG_AGENT_INFO to launchd: %s\n&amp;quot;, strerror (errno));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kill (pid, SIGTERM);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit (1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (opt.ssh_support)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;msg = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tmp = launch_data_alloc(LAUNCH_DATA_DICTIONARY);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;tmpv = launch_data_new_string(strchr(infostr_ssh_sock,
&lt;br&gt;'=') + 1); // Skip variable name and equal sign
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_dict_insert(tmp, tmpv, &amp;quot;SSH_AUTH_SOCK&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_dict_insert(msg, tmp, &amp;quot;SetUserEnvironment&amp;quot;);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;resp = launch_msg(msg);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_free(msg); // Do NOT launch_data_free() on
&lt;br&gt;tmp, nor tmpv
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if (resp)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;launch_data_free(resp);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;else
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;log_error (&amp;quot;failed to pass environment variable
&lt;br&gt;SSH_AUTH_SOCK to launchd: %s\n&amp;quot;, strerror (errno));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;kill (pid, SIGTERM);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;exit (1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26046987&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Setting-environment-variables-under-Snow-Leopard-advice.-tp26046987p26046987.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25857695</id>
	<title>Re: Preventing killing of child processes?</title>
	<published>2009-10-12T08:25:50Z</published>
	<updated>2009-10-12T08:25:50Z</updated>
	<author>
		<name>Sidney San Martín</name>
	</author>
	<content type="html">That did help — and as it turns out, my problem wasn't launchd, but a
&lt;br&gt;missed SIGPIPE at the same time. I should have debugged it out more
&lt;br&gt;before posting to the list.
&lt;br&gt;&lt;br&gt;Thanks, Dave.
&lt;br&gt;&lt;br&gt;On Fri, Oct 9, 2009 at 7:50 PM, Dave Keck &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25857695&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davekeck@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;&amp;gt; That doesn't seem to be doing it. The child process still exits as
&lt;br&gt;&amp;gt;&amp;gt; soon as it unloads the parent job from launchd.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Hmm, I just did a controlled test, and it certainly does the trick for
&lt;br&gt;&amp;gt; me on 10.5.8. Here's what I did:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ===== parent_process.c
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;unistd.h&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; int main(int argc, const char *argv[])
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt;    if (!fork())
&lt;br&gt;&amp;gt;    {
&lt;br&gt;&amp;gt;        execl(&amp;quot;/child_process&amp;quot;, &amp;quot;/child_process&amp;quot;);
&lt;br&gt;&amp;gt;        _exit(0);
&lt;br&gt;&amp;gt;    }
&lt;br&gt;&amp;gt;    sleep(10);
&lt;br&gt;&amp;gt;    return 0;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ===== child_process.c
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;&amp;gt; #include &amp;lt;unistd.h&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; int main(int argc, const char *argv[])
&lt;br&gt;&amp;gt; {
&lt;br&gt;&amp;gt;    setpgrp();
&lt;br&gt;&amp;gt;    sleep(60);
&lt;br&gt;&amp;gt;    return 0;
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ===== com.parent.parent_process.plist
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot;
&lt;br&gt;&amp;gt; &amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;dict&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;string&amp;gt;com.parent.parent_process&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;array&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;string&amp;gt;/parent_process&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/array&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;true/&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;gt; &amp;lt;/plist&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; =====
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Compile parent_process.c and child_process.c, and put them and the
&lt;br&gt;&amp;gt; plist in your drive's root directory. Then:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;    launchctl load /com.parent.parent_process.plist
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; You'll notice that the parent exits after 10 seconds, while the child
&lt;br&gt;&amp;gt; stays alive for a full minute. Likewise, if you unload the parent
&lt;br&gt;&amp;gt; early, the child still stays alive past the parent's death. Without
&lt;br&gt;&amp;gt; setpgrp(), the child dies with the parent. Does that help?
&lt;br&gt;&amp;gt;
&lt;/div&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25857695&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Preventing-killing-of-child-processes--tp25775986p25857695.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25856949</id>
	<title>Re: launchd &amp; launchctl Aqua session type on OSX Tiger</title>
	<published>2009-10-12T07:41:06Z</published>
	<updated>2009-10-12T07:41:06Z</updated>
	<author>
		<name>James Mead</name>
	</author>
	<content type="html">&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;meta content=&quot;text/html;charset=ISO-8859-1&quot; http-equiv=&quot;Content-Type&quot;&gt;
&lt;/head&gt;
&lt;body bgcolor=&quot;#ffffff&quot; text=&quot;#000000&quot;&gt;
&lt;tt&gt;Grant Erickson wrote:&lt;/tt&gt;
&lt;blockquote cite=&quot;mid:C6F49A19.1959B%25gerickson@nuovations.com&quot; type=&quot;cite&quot;&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;tt&gt;On 10/9/09 7:00 AM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25856949&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev-request@...&lt;/a&gt; wrote:
&lt;/tt&gt;&lt;/pre&gt;
  &lt;blockquote type=&quot;cite&quot;&gt;
    &lt;pre wrap=&quot;&quot;&gt;&lt;tt&gt;I have a script which I can successfully schedule using on OSX Leopard
as follows :-

launchctl load -w -S Aqua com.floehopper.script
Apparently I need the Aqua session type because the script accesses the
keychain using the SecKeychainFindGenericPassword function. If I don't
set the session type to Aqua, I get a errSecInteractionNotAllowed
&quot;Interaction with the Security Server is not allowed&quot; error (-25308).

However, I also want to schedule the script on OSX Tiger, but the
session type -S option is not available for launchctl.

I've tried calling the SecKeychainSetUserInteractionAllowed function
with the state parameter set to false, but then I end up with a
errSecAuthFailed &quot;Authorization/Authentication failed&quot; error (-25293).

Does anyone have any ideas how I might get this working on OSX Tiger?
&lt;/tt&gt;&lt;/pre&gt;
  &lt;/blockquote&gt;
  &lt;pre wrap=&quot;&quot;&gt;&lt;!----&gt;&lt;tt&gt;
James:

I'd recommend you read:

    &lt;a class=&quot;moz-txt-link-freetext&quot; href=&quot;http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html&lt;/a&gt;

LaunchAgents are, unfortunately, DOA (dead on arrival) in Tiger.
&lt;/tt&gt;&lt;/pre&gt;
&lt;/blockquote&gt;
&lt;tt&gt;&lt;br&gt;
Hi Grant,&lt;br&gt;
&lt;br&gt;
Thanks for your reply. I've read the Apple technical note, but I'm a
little confused. &lt;/tt&gt;&lt;tt&gt;I want to use my Launch Agent as a scheduled
task, not as something
that happens at login. Also I only want to support systems where a
single user is logging in via the GUI and not via ssh. The warning
below seems to imply that I should not have any problems. Or am I
missing something?&lt;br&gt;
&lt;br&gt;
&lt;/tt&gt;
&lt;blockquote type=&quot;cite&quot;&gt;&lt;tt&gt;WARNING: Prior to Mac OS X 10.5, launchd
agents were not particularly useful because there was no way for the
agent to specify the type of login session that the agent required (r.
4255854) . Thus, you couldn't use a launchd agent as the equivalent of
a global login item because it might be launched in the context of
non-GUI login session. Mac OS X 10.5 has addressed this limitation, as
described below. However, if you have to support older systems, you
should investigate some of the alternative technologies described in
Deprecated Daemonomicon.&lt;/tt&gt;&lt;/blockquote&gt;
&lt;tt&gt;&lt;br&gt;
Also even in Leopard, I found I needed to set the session type to Aqua,
whereas the technical note implies that the session type should default
to Aqua.&lt;br&gt;
&lt;br&gt;
&lt;blockquote type=&quot;cite&quot;&gt;To run your agent in a particular session type,
use the session type strings from Table 1 as the value of the
LimitLoadToSessionType property in your agent's property list file. If
you want to run in more than one session type, you can set
LimitLoadToSessionType to an array, where each element is a session
type string. If you don't specify the LimitLoadToSessionType property,
launchd assumes a value of Aqua.&lt;/blockquote&gt;
&lt;br&gt;
I have to admit I don't really understand why I need to set the session
type to Aqua to access the keychain programmatically in the first place!&lt;br&gt;
&lt;br&gt;
Regards, James.&lt;br&gt;
&lt;/tt&gt;
&lt;/body&gt;
&lt;/html&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25856949&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd---launchctl-Aqua-session-type-on-OSX-Tiger-tp25818738p25856949.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25829560</id>
	<title>Re: Preventing killing of child processes?</title>
	<published>2009-10-09T16:50:01Z</published>
	<updated>2009-10-09T16:50:01Z</updated>
	<author>
		<name>Dave Keck</name>
	</author>
	<content type="html">&amp;gt; That doesn't seem to be doing it. The child process still exits as
&lt;br&gt;&amp;gt; soon as it unloads the parent job from launchd.
&lt;br&gt;&lt;br&gt;Hmm, I just did a controlled test, and it certainly does the trick for
&lt;br&gt;me on 10.5.8. Here's what I did:
&lt;br&gt;&lt;br&gt;===== parent_process.c
&lt;br&gt;&lt;br&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;#include &amp;lt;unistd.h&amp;gt;
&lt;br&gt;&lt;br&gt;int main(int argc, const char *argv[])
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (!fork())
&lt;br&gt;&amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; execl(&amp;quot;/child_process&amp;quot;, &amp;quot;/child_process&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; _exit(0);
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; sleep(10);
&lt;br&gt;&amp;nbsp; &amp;nbsp; return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;===== child_process.c
&lt;br&gt;&lt;br&gt;#include &amp;lt;stdio.h&amp;gt;
&lt;br&gt;#include &amp;lt;unistd.h&amp;gt;
&lt;br&gt;&lt;br&gt;int main(int argc, const char *argv[])
&lt;br&gt;{
&lt;br&gt;&amp;nbsp; &amp;nbsp; setpgrp();
&lt;br&gt;&amp;nbsp; &amp;nbsp; sleep(60);
&lt;br&gt;&amp;nbsp; &amp;nbsp; return 0;
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;===== com.parent.parent_process.plist
&lt;br&gt;&lt;br&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;
&lt;br&gt;&amp;lt;!DOCTYPE plist PUBLIC &amp;quot;-//Apple//DTD PLIST 1.0//EN&amp;quot;
&lt;br&gt;&amp;quot;&lt;a href=&quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.apple.com/DTDs/PropertyList-1.0.dtd&lt;/a&gt;&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;plist version=&amp;quot;1.0&amp;quot;&amp;gt;
&lt;br&gt;&amp;lt;dict&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;Label&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;lt;string&amp;gt;com.parent.parent_process&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;ProgramArguments&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;lt;array&amp;gt;
&lt;br&gt;&amp;lt;string&amp;gt;/parent_process&amp;lt;/string&amp;gt;
&lt;br&gt;&amp;lt;/array&amp;gt;
&lt;br&gt;&amp;lt;key&amp;gt;RunAtLoad&amp;lt;/key&amp;gt;
&lt;br&gt;&amp;lt;true/&amp;gt;
&lt;br&gt;&amp;lt;/dict&amp;gt;
&lt;br&gt;&amp;lt;/plist&amp;gt;
&lt;br&gt;&lt;br&gt;=====
&lt;br&gt;&lt;br&gt;Compile parent_process.c and child_process.c, and put them and the
&lt;br&gt;plist in your drive's root directory. Then:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; launchctl load /com.parent.parent_process.plist
&lt;br&gt;&lt;br&gt;You'll notice that the parent exits after 10 seconds, while the child
&lt;br&gt;stays alive for a full minute. Likewise, if you unload the parent
&lt;br&gt;early, the child still stays alive past the parent's death. Without
&lt;br&gt;setpgrp(), the child dies with the parent. Does that help?
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25829560&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Preventing-killing-of-child-processes--tp25775986p25829560.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25828324</id>
	<title>Re: Preventing killing of child processes?</title>
	<published>2009-10-09T14:43:50Z</published>
	<updated>2009-10-09T14:43:50Z</updated>
	<author>
		<name>Sidney San Martín</name>
	</author>
	<content type="html">That doesn't seem to be doing it. The child process still exits as
&lt;br&gt;soon as it unloads the parent job from launchd.
&lt;br&gt;&lt;br&gt;On Tue, Oct 6, 2009 at 7:09 PM, Dave Keck &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25828324&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;davekeck@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; Calling setpgrp() from your child should prevent launchd from killing it.
&lt;br&gt;&amp;gt;
&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25828324&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Preventing-killing-of-child-processes--tp25775986p25828324.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25824436</id>
	<title>Re: launchd &amp; launchctl Aqua session type on OSX Tiger</title>
	<published>2009-10-09T09:49:23Z</published>
	<updated>2009-10-09T09:49:23Z</updated>
	<author>
		<name>Damien Sorresso</name>
	</author>
	<content type="html">On Oct 9, 2009, at 7:43 AM, Grant Erickson wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On 10/9/09 7:00 AM, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25824436&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev-request@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; I have a script which I can successfully schedule using on OSX Leopard
&lt;br&gt;&amp;gt;&amp;gt; as follows :-
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; launchctl load -w -S Aqua com.floehopper.script
&lt;br&gt;&amp;gt;&amp;gt; Apparently I need the Aqua session type because the script accesses the
&lt;br&gt;&amp;gt;&amp;gt; keychain using the SecKeychainFindGenericPassword function. If I don't
&lt;br&gt;&amp;gt;&amp;gt; set the session type to Aqua, I get a errSecInteractionNotAllowed
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;Interaction with the Security Server is not allowed&amp;quot; error (-25308).
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; However, I also want to schedule the script on OSX Tiger, but the
&lt;br&gt;&amp;gt;&amp;gt; session type -S option is not available for launchctl.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I've tried calling the SecKeychainSetUserInteractionAllowed function
&lt;br&gt;&amp;gt;&amp;gt; with the state parameter set to false, but then I end up with a
&lt;br&gt;&amp;gt;&amp;gt; errSecAuthFailed &amp;quot;Authorization/Authentication failed&amp;quot; error (-25293).
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Does anyone have any ideas how I might get this working on OSX Tiger?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; James:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'd recommend you read:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://developer.apple.com/mac/library/technotes/tn2005/tn2083.html&lt;/a&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; LaunchAgents are, unfortunately, DOA (dead on arrival) in Tiger.
&lt;/div&gt;&lt;br&gt;&lt;br&gt;To be pedantic, they were never alive on Tiger in the first place. :)
&lt;br&gt;-- 
&lt;br&gt;Damien Sorresso
&lt;br&gt;BSD Engineering
&lt;br&gt;Apple Inc.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;launchd-dev mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25824436&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;launchd-dev@...&lt;/a&gt;
&lt;br&gt;&lt;a href=&quot;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/launchd---launchctl-Aqua-session-type-on-OSX-Tiger-tp25818738p25824436.html" />
</entry>

</feed>
