AFP548 Changing the world one server at a time.

How to get a Launchd to wait at startup

Home › Forums › OS X Server and Client Discussion › Questions and Answers › How to get a Launchd to wait at startup

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #369835
    benfeea1
    Participant

    I have a script that changes the root password. It pulls the new password down from a web page (SSL encrypted).
    I use launchd to run the script every hour. It also tries to run it at startup. However, I think it is trying to run the script before it has network access.
    How can I have launchd wait for the network?
    I think it would be an environmental variable that requires the network, but I’m not too sure.
    I use Lingon to make my launchd items.

    Here is the launchd I use.

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
    	<key>Label</key>
    	<string>edu.jhuapl.idsmacteam.adminPassChange</string>
    	<key>ProgramArguments</key>
    	<array>
    		<string>/usr/local/jhuapl/bin/adminPassChange.pl</string>
    	</array>
    	<key>RunAtLoad</key>
    	<true/>
    	<key>StartInterval</key>
    	<integer>3600</integer>
    </dict>
    </plist>
    [code]
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.