Xymon Mailing List Archive search

LaunchDaemons mac.. again...

4 messages in this thread

list Willam Ottley · Fri, 12 Jun 2009 14:45:21 -0400 (EDT) ·
Hi all,
Tried with advice recently from here, and other places to do a proper plist file
But for some reason it doesn't work properly.
could anyone have a quick look and see if the structure is wrong?
Thanks!

ns1:LaunchDaemons root# cat com.xymon.client.plist <?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.xymon.client</string>         <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/Users/xymon/client/runclient.sh</string>
                <key>ProgramArguments</key>
                <array>                         <string>/Users/xymon/client/runclient.sh</string>
                        <string>start</string>
                </array>
        <key>RunAtLoad</key>
        <true/>
        <key>ServiceDescription</key>
        <string>Xymon Startup</string>
        <key>UserName</key>
        <key>RunAtLoad</key>
</dict>
</plist>

This message is intended only for the use of the individual or entity to which it is addressed, and may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If the reader of this is not the intended recipient, or the employee or agent responsible for delivering the message to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify me immediately by return email and delete this message from your system. Thank you.
list Dshiels · Fri, 12 Jun 2009 12:59:15 -0700 ·
Wouldn't it just be easier to put a nanny line in the user crontab to fire
it up?

*/30 * * * * (ps -ef | grep -v grep | grep xymon || <run server start script
here> )
Adjust as your env requirements may be different.
quoted from Willam Ottley

On 6/12/09 11:45 AM, "Willam Ottley" <user-62b2930b482c@xymon.invalid> wrote:
Hi all,
Tried with advice recently from here, and other places to do a proper plist
file
But for some reason it doesn't work properly.
could anyone have a quick look and see if the structure is wrong?
Thanks!

ns1:LaunchDaemons root# cat com.xymon.client.plist
<?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.xymon.client</string>
        <key>OnDemand</key>
        <false/>
        <key>Program</key>
        <string>/Users/xymon/client/runclient.sh</string>
                <key>ProgramArguments</key>
                <array>
                        <string>/Users/xymon/client/runclient.sh</string>
                        <string>start</string>
                </array>
        <key>RunAtLoad</key>
        <true/>
        <key>ServiceDescription</key>
        <string>Xymon Startup</string>
        <key>UserName</key>
        <key>RunAtLoad</key>
</dict>
</plist>

This message is intended only for the use of the individual or entity
to which it is addressed, and may contain information that is
privileged, confidential and/or exempt from disclosure under
applicable law. If the reader of this is not the intended recipient,
or the employee or agent responsible for delivering the message to the
intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited.
If you have received this communication in error, please notify me
immediately by return email and delete this message from your system.
Thank you.

list Rob McBroom · Tue, 16 Jun 2009 11:37:35 -0400 ·
On 2009-Jun-12, at 2:45 PM, Willam Ottley wrote:
       <key>Program</key>
       <string>/Users/xymon/client/runclient.sh</string>
               <key>ProgramArguments</key>
               <array>
                       <string>/Users/xymon/client/runclient.sh</ string>
                       <string>start</string>
               </array>

I mentioned before that runclient.sh probably won't work with launchd  since it exits, but I imagine you've done more testing since then and  maybe you know something I don't. Also, the section above will run the  command as `/Users/xymon/client/runclient.sh /Users/xymon/client/ runclient.sh start`. I think you want to omit the Program section and  use only the ProgramArguments as you have it written so it will end up  running just `/Users/xymon/client/runclient.sh start`.

-- 
Rob McBroom
<http://www.skurfer.com/>;
list Rob McBroom · Tue, 16 Jun 2009 14:12:23 -0400 ·
quoted from Willam Ottley
On 2009-Jun-12, at 2:45 PM, Willam Ottley wrote:
Tried with advice recently from here, and other places to do a  
proper plist file
But for some reason it doesn't work properly.

See if this one works.