diff --git a/heartbeat/pound b/heartbeat/pound new file mode 100755 index 000000000..06f721b18 --- /dev/null +++ b/heartbeat/pound @@ -0,0 +1,312 @@ +#!/bin/sh +# +# +# Pound +# +# Description: Manage pound instances as a HA resource +# +# Author: Taro Matsuzawa +# +# License: GNU General Public License (GPL) +# +# See usage() for more details +# +# OCF instance parameters: +# OCF_RESKEY_pid +# OCF_RESKEY_binary +# OCF_RESKEY_ctl_binary +# OCF_RESKEY_socket_path +# OCF_RESKEY_config +# OCF_RESKEY_name +# +####################################################################### +# Initialization: +: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat} +. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs + +####################################################################### +# Set default paramenter values + +# Set these two first, as other defaults depend on it +OCF_RESKEY_name_default=${OCF_RESOURCE_INSTANCE} +: ${OCF_RESKEY_name=${OCF_RESKEY_name_default}} + +OCF_RESKEY_binary_default=pound +OCF_RESKEY_ctl_binary_default=poundctl +OCF_RESKEY_pid_default=/var/run/pound_${OCF_RESKEY_name}.pid +OCF_RESKEY_socket_path_default=/var/lib/pound/pound.cfg + +: ${OCF_RESKEY_binary=${OCF_RESKEY_binary_default}} +: ${OCF_RESKEY_ctl_binary=${OCF_RESKEY_client_ctl_default}} +: ${OCF_RESKEY_pid=${OCF_RESKEY_pid_default}} +: ${OCF_RESKEY_socket_path=${OCF_RESKEY_socket_path_default}} + +meta_data() { + cat < + + +1.0 + + +The Pound Resource Agent can manage pound instances. + +Manage a Pound instance + + + + + +The Pound configuration file that pound should manage, for example +"/etc/pound.cfg". + +Pound configuration file + + + + + +Override the name of the instance that should be given to pound +(defaults to the resource identifier). + +Instance name + + + + + +Write the process's PID to the specified file. +The default will include the specified name, ie.: +"/var/run/pound_production.pid". Unlike what this help message shows. +It is most likely not necessary to change this parameter. + +Pidfile + + + + + +This is used to start pound server. +Normally use pound. + + + + + + + +This is used to watch pound status via unix socket. +Normally use poundctl. + + + + + + + +Write the process's unix socket. +This parameter is same 'Control' parameter in configuration file, ie.: +Control "/var/lib/pound/pound.cfg" + + + + + + + + + + + + + + + + +END +} + +####################################################################### + + +pound_usage() { + cat <