summaryrefslogtreecommitdiff
path: root/dev-db/pgbouncer/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:57:42 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 20:57:42 +0100
commit1798c4aeca70ac8d0a243684d6a798fbc65735f8 (patch)
treee48e19cb6fa03de18e1c63e1a93371b7ebc4eb56 /dev-db/pgbouncer/files
parentd87262dd706fec50cd150aab3e93883b6337466d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-db/pgbouncer/files')
-rw-r--r--dev-db/pgbouncer/files/logrotate7
-rw-r--r--dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch32
-rw-r--r--dev-db/pgbouncer/files/pgbouncer.confd12
-rwxr-xr-xdev-db/pgbouncer/files/pgbouncer.initd-r183
4 files changed, 0 insertions, 134 deletions
diff --git a/dev-db/pgbouncer/files/logrotate b/dev-db/pgbouncer/files/logrotate
deleted file mode 100644
index 9617eafa66b0..000000000000
--- a/dev-db/pgbouncer/files/logrotate
+++ /dev/null
@@ -1,7 +0,0 @@
-/var/log/pgbouncer/pgbouncer.log {
- missingok
- sharedscripts
- postrotate
- /etc/init.d/pgbouncer -q reload
- endscript
-} \ No newline at end of file
diff --git a/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch b/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch
deleted file mode 100644
index cc4d0634b6b3..000000000000
--- a/dev-db/pgbouncer/files/pgbouncer-1.8-dirs.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff -Naruw pgbouncer-1.8.orig/etc/pgbouncer.ini pgbouncer-1.8/etc/pgbouncer.ini
---- pgbouncer-1.8.orig/etc/pgbouncer.ini 2017-12-18 11:03:18.000000000 -0500
-+++ pgbouncer-1.8/etc/pgbouncer.ini 2017-12-20 06:48:25.935839539 -0500
-@@ -34,7 +34,9 @@
- ;;;
-
- logfile = /var/log/pgbouncer/pgbouncer.log
--pidfile = /var/run/pgbouncer/pgbouncer.pid
-+
-+; Leave unset. This is handled in the initscript.
-+;pidfile =
-
- ;;;
- ;;; Where to wait for clients
-@@ -44,11 +46,12 @@
- listen_addr = 127.0.0.1
- listen_port = 6432
-
--; Unix socket is also used for -R.
--; On Debian it should be /var/run/postgresql
--;unix_socket_dir = /tmp
--;unix_socket_mode = 0777
--;unix_socket_group =
-+; Unix socket is also used for -R (online restart), but the
-+; initscripts can't do that. Generally, you'll want to leave these
-+; alone. System-wide default is: /run/postgresql
-+unix_socket_dir = /run/postgresql
-+unix_socket_mode = 0777
-+unix_socket_group = postgres
-
- ;;;
- ;;; TLS settings for accepting clients
diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd
deleted file mode 100644
index e2c584011884..000000000000
--- a/dev-db/pgbouncer/files/pgbouncer.confd
+++ /dev/null
@@ -1,12 +0,0 @@
-# Location of configuration file for PgBouncer.
-INIFILE="/etc/pgbouncer.ini"
-
-# How long to wait in seconds for a safe shutdown. Equivalent to
-# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.)
-NICE_TIMEOUT=60
-
-# Set to 'YES' to perform an immediate shutdown if the nice shutdown
-# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1
-# pgbouncer'.)
-FORCE_QUIT="no"
-FORCE_QUIT_TIMEOUT=2 \ No newline at end of file
diff --git a/dev-db/pgbouncer/files/pgbouncer.initd-r1 b/dev-db/pgbouncer/files/pgbouncer.initd-r1
deleted file mode 100755
index 7392918593bb..000000000000
--- a/dev-db/pgbouncer/files/pgbouncer.initd-r1
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/sbin/openrc-run
-
-extra_started_commands="reload"
-
-PIDFILE="/run/pgbouncer.pid"
-
-depend() {
- use net
- after postgresql
-}
-
-get_config() {
- [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found"
-
- eval echo $(sed -e 's:;.*::' "${INIFILE}" | \
- awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }')
-}
-
-start_pre() {
- local s="$(get_config unix_socket_dir)"
-
- if [ -n "${s}" ] ; then
- checkpath -o root:postgres -m 1775 -d "${s}" || return 1
-
- local listen_port="$(get_config listen_port)"
-
- if [ -e "${s%/}/.s.PGSQL.${listen_port}" ] ; then
- eerror "Socket conflict."
- eerror "A server is already listening on:"
- eerror " ${s%/}/.s.PGSQL.${listen_port}"
- eerror "HINT: Change listen_port in pgbouncer.ini to listen on a"
- eerror "different socket."
- return 1
- fi
- fi
-
- checkpath -o pgbouncer:postgres -m 0755 \
- -d "$(dirname $(get_config logfile))" || return 1
- checkpath -o pgbouncer:postgres -m 0640 \
- -f "$(get_config logfile)" || return 1
-
- return 0
-}
-
-start() {
- ebegin "Starting PgBouncer"
- [ -f ${PIDFILE} ] && rm ${PIDFILE}
-
- start-stop-daemon --start \
- --pidfile ${PIDFILE} \
- --background \
- --make-pidfile \
- --user pgbouncer \
- --exec /usr/bin/pgbouncer \
- -- -q "${INIFILE}"
- eend $?
-}
-
-stop() {
- local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} ))
- ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)"
-
- local retries=SIGINT/${NICE_TIMEOUT}
-
- if [ "${FORCE_QUIT}" = "YES" ] ; then
- einfo "FORCE_QUIT enabled."
- retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}"
- fi
-
- # Loops through nice and force quit in one go.
- start-stop-daemon --stop \
- --user pgbouncer \
- --pidfile ${PIDFILE} \
- --retry ${retries}
-
- eend $?
-}
-
-reload() {
- ebegin "Reloading PgBouncer configuration from '${INIFILE}'"
- start-stop-daemon --signal HUP --pidfile ${PIDFILE}
- eend $?
-}