Re: Adding KeepAlive in LauchDaemon plist
Re: Adding KeepAlive in LauchDaemon plist
- Subject: Re: Adding KeepAlive in LauchDaemon plist
- From: Chris McAloney <email@hidden>
- Date: Wed, 21 Sep 2011 10:12:25 -0300
I would amend Christian's suggestion as follows:
<key>Program</key>
<string>/usr/local/encase/Encase</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/encase/Encase</string>
<string>start</string>
</array>
The type of the Program key is a string, not an array, and the program name should be duplicated as the first parameter of the ProgramArguments array, since this array is passed as-is to execvp() (and the name of the executable to run is always the first element of the parameter list).
As for why it doesn't seem to be kept alive, the man page for launchd.plist says this under the KeepAlive key: "Jobs that exit quickly and frequently when configured to be kept alive will be throttled to conserve system resources.". Is it possible that the job is actually being started but is terminating quickly because of some other error?
Chris
On Tue, Sep 20, 2011 at 10:12 AM, Karthikeyan M
<email@hidden> wrote:
Hi Christian,
I have changed as you mentioned, now the process did not launch when
rebooted. Any other changes need to be done?
<string>com.guidancesoftware.encaseforensicservlet</string>
<key>Program</key>
<array>
<string>/usr/local/encase/EnCase</string>
</array>
<key>ProgramArguments</key>
<array>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Thanks & Regards,
Karthikeyan
On 20/09/11 6:29 PM, Christian Lindemer wrote:
I am by no means an expert, but have you tried this:
<key>Program</key>
<array>
<string>/usr/local/encase/Encase</string>
</array>
<key>ProgramArguments</key>
<array>
<string>start</string>
</array>
…which gives launchd a clue as to which binary it needs to keep alive.
-Christian
On Tue, September 20, 2011 6:20 am, Karthikeyan M wrote:
Hi,
I am trying to create a Launch Daemon for EnCase binary file. I have to
add KeepAlive to the Launch Daemon plist. The process should be alive
even if it exists normally (with exit 0) or crashes with error.
I tried adding <key>KeepAlive</key> in the Launch Daemon(below) created
but this keeps on running the Program Arguments resulting in multiple
process of the same binary.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.guidancesoftware.encase</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/encase/Encase</string>
<string>start</string>
</array>
<key>QueueDirectories</key>
<array/>
<key>RunAtLoad</key>
<true/>
<key>WatchPaths</key>
<array/>
</dict>
</plist>
Someone help me in changing the LauchDaemon plist so that the process
kickstart again if it exits?
Thanks & Regards,
Karthikeyan M
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (
email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to
email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Installer-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden