* [gentoo-commits] gentoo-x86 commit in dev-db/pgpool2/files: pgpool2.initd
@ 2011-03-02 8:52 Tomas Chvatal (scarabeus)
0 siblings, 0 replies; 2+ messages in thread
From: Tomas Chvatal (scarabeus) @ 2011-03-02 8:52 UTC (permalink / raw
To: gentoo-commits
scarabeus 11/03/02 08:52:52
Modified: pgpool2.initd
Log:
Update the initscript to use pgpool rather than start-stop-daemon, but it still does not do what i want. TBD.
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64)
Revision Changes Path
1.2 dev-db/pgpool2/files/pgpool2.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?r1=1.1&r2=1.2
Index: pgpool2.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- pgpool2.initd 26 Jan 2011 16:49:10 -0000 1.1
+++ pgpool2.initd 2 Mar 2011 08:52:52 -0000 1.2
@@ -1,36 +1,29 @@
#!/sbin/runscript
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.1 2011/01/26 16:49:10 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.2 2011/03/02 08:52:52 scarabeus Exp $
depend() {
need net
}
-ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -n"
+ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -D"
LOGFILE="/var/log/pgpool2.log"
start() {
ebegin "Starting pgpool2"
-
- if [ -n "${RC_UNAME}" ]; then
- PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}"
- else
- PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1"
- fi
-
- start-stop-daemon --start --quiet --background --exec /usr/bin/pgpool ${PARAMS}
+ /usr/bin/pgpool ${ARGS} >> "${LOGFILE}" 2>&1
eend $?
}
stop() {
ebegin "Stopping pgpool2"
- start-stop-daemon --stop --quiet --exec /usr/bin/pgpool
+ /usr/bin/pgpool -m fast stop >> "${LOGFILE}" 2>&1
eend $?
}
restart() {
- stop
+ svc_stop
sleep 3
- start
+ svc_start
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in dev-db/pgpool2/files: pgpool2.initd
@ 2012-12-27 11:37 Aaron Swenson (titanofold)
0 siblings, 0 replies; 2+ messages in thread
From: Aaron Swenson (titanofold) @ 2012-12-27 11:37 UTC (permalink / raw
To: gentoo-commits
titanofold 12/12/27 11:37:59
Modified: pgpool2.initd
Log:
Fix bug 410121 and bug 444028.
(Portage version: 2.1.11.31/cvs/Linux x86_64, signed Manifest commit with key D1BBFDA0)
Revision Changes Path
1.4 dev-db/pgpool2/files/pgpool2.initd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?r1=1.3&r2=1.4
Index: pgpool2.initd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- pgpool2.initd 14 Aug 2012 19:50:17 -0000 1.3
+++ pgpool2.initd 27 Dec 2012 11:37:59 -0000 1.4
@@ -1,17 +1,17 @@
#!/sbin/runscript
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.3 2012/08/14 19:50:17 titanofold Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.4 2012/12/27 11:37:59 titanofold Exp $
extra_started_commands="reload"
CONFIGFILE="/etc/pgpool2/pgpool.conf"
LOGFILE="/var/log/pgpool2.log"
-PIDFILE=""
depend() {
use net
use postgresql
+ after logger
}
get_config() {
@@ -22,13 +22,21 @@
}
PIDFILE="$(get_config pid_file_name)"
+: ${PIDFILE:='/run/pgpool/pgpool.pid'}
prep() {
+ # $logdir contains status file(s), not log files.
+ local logdir=$(get_config logdir)
+ local socket_dir=$(get_config socket_dir)
+ local pcp_socket_dir=$(get_config pcp_socket_dir)
+
checkpath -o pgpool:postgres -m 0770 -d $(dirname ${PIDFILE}) || return 1
- checkpath -o pgpool:postgres -m 0770 -d $(get_config logdir) || return 1
+ checkpath -o pgpool:postgres -m 0770 -d ${logdir:-'/run/pgpool'} || return 1
checkpath -o pgpool:postgres -m 0660 -f ${LOGFILE} || return 1
- checkpath -o postgres:postgres -m 0770 -d $(get_config socket_dir) || return 1
- checkpath -o postgres:postgres -m 0770 -d $(get_config pcp_socket_dir) || return 1
+ checkpath -o postgres:postgres -m 0770 \
+ -d ${socket_dir:-'/run/postgresql'} || return 1
+ checkpath -o postgres:postgres -m 0770 \
+ -d ${pcp_socket_dir:-'/run/postgresql'} || return 1
}
start() {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-27 11:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-02 8:52 [gentoo-commits] gentoo-x86 commit in dev-db/pgpool2/files: pgpool2.initd Tomas Chvatal (scarabeus)
-- strict thread matches above, loose matches on Subject: below --
2012-12-27 11:37 Aaron Swenson (titanofold)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox