<?xml version="1.0"?>
<!DOCTYPE resource-agent SYSTEM "ra-api-1-modified.dtd">
<resource-agent version="rgmanager 2.0" name="apache">
    <version>1.0</version>

    <longdesc lang="en">
        This defines an instance of Apache web server
    </longdesc>
    <shortdesc lang="en">
        Defines an Apache web server
    </shortdesc>

    <parameters>
        <parameter name="name" primary="1">
	    <longdesc lang="en">
	        Define a name for use in &lt;IfDefine name&gt; directive.
	    </longdesc>
            <shortdesc lang="en">
                Name
            </shortdesc>
	    <content type="string"/>
        </parameter>

        <parameter name="httpd" >
	    <longdesc lang="en">
	        Define the full path to the httpd binary.
	    </longdesc>
            <shortdesc lang="en">
                httpd binary
            </shortdesc>
	    <content type="string" />
        </parameter>

        <parameter name="server_root">
            <longdesc lang="en">
                Define an alternate initial ServerRoot
            </longdesc>
            <shortdesc lang="en">
                Initial ServerRoot
            </shortdesc>
	    <content type="string" default="/etc/httpd"/>
        </parameter>

        <parameter name="config_file">
            <longdesc lang="en">
                Define an alternate ServerConfigFile
            </longdesc>
            <shortdesc lang="en">
                Initial ServerConfigFile
            </shortdesc>
            <content type="string" default="conf/httpd.conf"/>
        </parameter>

	<parameter name="httpd_options">
	    <longdesc lang="en">
		Other command-line options for httpd
	    </longdesc>
	    <shortdesc lang="en">
		Other command-line options for httpd
	    </shortdesc>
	    <content type="string" />
	</parameter>

	<parameter name="shutdown_wait">
	    <longdesc lang="en">
		Wait X seconds for correct end of service shutdown
	    </longdesc>
	    <shortdesc lang="en">
		Wait X seconds for correct end of service shutdown
	    </shortdesc>
	    <content type="integer" />
	</parameter>

        <parameter name="service_name" inherit="service%name">
            <longdesc lang="en">
	    	Inherit the service name.  We need to know
		the service name in order to determine file
		systems and IPs for this service.
            </longdesc>
            <shortdesc lang="en">
	    	Inherit the service name.
            </shortdesc>
	    <content type="string"/>
        </parameter>

    </parameters>

    <actions>
        <action name="start" timeout="0"/>
	<action name="stop" timeout="0"/>

	<!-- Checks to see if it''s mounted in the right place -->
	<action name="status" interval="1m" timeout="10"/>
	<action name="monitor" interval="1m" timeout="10"/>

	<!-- Checks to see if we can read from the mountpoint -->
	<action name="status" depth="10" timeout="30" interval="5m"/>
	<action name="monitor" depth="10" timeout="30" interval="5m"/>

	<action name="meta-data" timeout="1"/>
	<action name="validate-all" timeout="1"/>
    </actions>

    <special tag="rgmanager">
    </special>
</resource-agent>
