Changeset View
Changeset View
Standalone View
Standalone View
databases/pgpool-II-43/files/pgpool.in
Show All 10 Lines | |||||
# Set it to YES to enable pgpool. | # Set it to YES to enable pgpool. | ||||
# pgpool_conf (file): Set location of your config. | # pgpool_conf (file): Set location of your config. | ||||
# Default is "%%PREFIX%%/etc/pgpool.conf" | # Default is "%%PREFIX%%/etc/pgpool.conf" | ||||
# pgpool_hba (file): Set location of your pool hba file. | # pgpool_hba (file): Set location of your pool hba file. | ||||
# Default is "%%PREFIX%%/etc/pool_hba.conf" | # Default is "%%PREFIX%%/etc/pool_hba.conf" | ||||
# pgpool_pcp (file): Set location of your pcp conf file. | # pgpool_pcp (file): Set location of your pcp conf file. | ||||
# Default is "%%PREFIX%%/etc/pcp.conf" | # Default is "%%PREFIX%%/etc/pcp.conf" | ||||
# pgpool_user (uid): User ID to run as (default nobody) | # pgpool_user (uid): User ID to run as (default nobody) | ||||
# pgpool_group (gid): Group ID to run as (default nobody) | |||||
# pgpool_stop_mode (string): Shutdown mode | # pgpool_stop_mode (string): Shutdown mode | ||||
# Default is "smart" | # Default is "smart" | ||||
# Possibilities are "smart", "fast", or "immediate" | # Possibilities are "smart", "fast", or "immediate" | ||||
# | # | ||||
. /etc/rc.subr | . /etc/rc.subr | ||||
name=pgpool | name=pgpool | ||||
rcvar=pgpool_enable | rcvar=pgpool_enable | ||||
load_rc_config $name | load_rc_config $name | ||||
: ${pgpool_enable="NO"} | : ${pgpool_enable="NO"} | ||||
: ${pgpool_conf="%%PREFIX%%/etc/pgpool.conf"} | : ${pgpool_conf="%%PREFIX%%/etc/pgpool.conf"} | ||||
: ${pgpool_hba="%%PREFIX%%/etc/pool_hba.conf"} | : ${pgpool_hba="%%PREFIX%%/etc/pool_hba.conf"} | ||||
: ${pgpool_pcp="%%PREFIX%%/etc/pcp.conf"} | : ${pgpool_pcp="%%PREFIX%%/etc/pcp.conf"} | ||||
: ${pgpool_user="nobody"} | : ${pgpool_user="nobody"} | ||||
: ${pgpool_group="nobody"} | |||||
: ${pgpool_stop_mode="smart"} | : ${pgpool_stop_mode="smart"} | ||||
_piddir="/var/run/pgpool" | |||||
pidfile="${_piddir}/pgpool.pid" | |||||
command="%%PREFIX%%/bin/pgpool" | command="%%PREFIX%%/bin/pgpool" | ||||
command_args="-f ${pgpool_conf} -a ${pgpool_hba} -F ${pgpool_pcp}" | command_args="-f ${pgpool_conf} -a ${pgpool_hba} -F ${pgpool_pcp}" | ||||
start_precmd="install -d -o ${pgpool_user} -g ${pgpool_group} -m 755 $_piddir" | |||||
stop_cmd="${command} -m ${pgpool_stop_mode} ${command_args} stop" | stop_cmd="${command} -m ${pgpool_stop_mode} ${command_args} stop" | ||||
reload_cmd="${command} ${command_args} reload" | reload_cmd="${command} ${command_args} reload" | ||||
extra_commands="reload" | extra_commands="reload" | ||||
required_files="${pgpool_conf}" | required_files="${pgpool_conf}" | ||||
run_rc_command "$1" | run_rc_command "$1" | ||||