%name apache

# Copyright (C) 2009 Dejan Muhamedagic
#
# License: GNU General Public License (GPL)

# Apache web server
#
# This template generates a single primitive resource of type apache

%depends_on virtual-ip
%suggests filesystem

# NB:
# The apache RA monitor operation requires the status module to
# be loaded and access to its page (/server-status) allowed from
# localhost (127.0.0.1). Typically, the status module is not
# loaded by default. How to enable it depends on your
# distribution. For instance, on recent openSUSE or SLES
# releases, it is enough to add word "status" to the list in
# variable APACHE_MODULES in file /etc/sysconfig/apache2 and then
# start and stop apache once using rcapache2.

%required

# Name the apache resource
# For example, to name the resource web-1, edit the line below
# as follows:
# %% id web-1
%% id

# The full pathname of the Apache configuration file
# Example:
# %% configfile /etc/apache2/httpd.conf
%% configfile 

%optional

# Extra options to apply when starting apache. See man httpd(8).

%% options 

# Files (one or more) which contain extra environment variables,
# such as /etc/apache2/envvars

%% envfiles 

%generate

primitive %apache ocf:heartbeat:apache
	params configfile=%_:configfile
	opt options=%_:options
	opt envfiles=%_:envfiles

monitor %apache 120s:60s

group %_:id
	%if %filesystem
		%filesystem
	%fi
	%apache %virtual-ip
