mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-12 07:27:57 +00:00
1ba25ff183
Repo-copy of databases/pgpool-II-36 PR: 227481 Submitted by: Franco Ricci <franco.ricc@gmail.com>
41 lines
942 B
Bash
41 lines
942 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: pgpool
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
|
# to enable this service:
|
|
#
|
|
# pgpool_enable (bool): Set to NO by default.
|
|
# Set it to YES to enable pgpool.
|
|
# pgpool_conf (file): Set location of your config.
|
|
# Default is "%%PREFIX%%/etc/pgpool.conf"
|
|
# pgpool_user (uid): User ID to run as (default nobody)
|
|
# pgpool_stop_mode (string): Shutdown mode
|
|
# Default is "smart"
|
|
# Possibilities are "smart", "fast", or "immediate"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=pgpool
|
|
rcvar=pgpool_enable
|
|
|
|
load_rc_config $name
|
|
|
|
: ${pgpool_enable="NO"}
|
|
: ${pgpool_conf="%%PREFIX%%/etc/pgpool.conf"}
|
|
: ${pgpool_user="nobody"}
|
|
: ${pgpool_stop_mode="smart"}
|
|
|
|
command="%%PREFIX%%/bin/pgpool"
|
|
command_args="-f ${pgpool_conf}"
|
|
stop_cmd="${command} -m ${pgpool_stop_mode} ${command_args} stop"
|
|
|
|
required_files="${pgpool_conf}"
|
|
|
|
run_rc_command "$1"
|