1 |
scarabeus 11/03/02 08:52:52 |
2 |
|
3 |
Modified: pgpool2.initd |
4 |
Log: |
5 |
Update the initscript to use pgpool rather than start-stop-daemon, but it still does not do what i want. TBD. |
6 |
|
7 |
(Portage version: 2.2.0_alpha25/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.2 dev-db/pgpool2/files/pgpool2.initd |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.2&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?rev=1.2&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd?r1=1.1&r2=1.2 |
15 |
|
16 |
Index: pgpool2.initd |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v |
19 |
retrieving revision 1.1 |
20 |
retrieving revision 1.2 |
21 |
diff -u -r1.1 -r1.2 |
22 |
--- pgpool2.initd 26 Jan 2011 16:49:10 -0000 1.1 |
23 |
+++ pgpool2.initd 2 Mar 2011 08:52:52 -0000 1.2 |
24 |
@@ -1,36 +1,29 @@ |
25 |
#!/sbin/runscript |
26 |
# Copyright 1999-2011 Gentoo Foundation |
27 |
# Distributed under the terms of the GNU General Public License v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.1 2011/01/26 16:49:10 scarabeus Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/dev-db/pgpool2/files/pgpool2.initd,v 1.2 2011/03/02 08:52:52 scarabeus Exp $ |
30 |
|
31 |
depend() { |
32 |
need net |
33 |
} |
34 |
|
35 |
-ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -n" |
36 |
+ARGS="-f /etc/pgpool2/pgpool.conf -a /etc/pgpool2/pool_hba.conf -F /etc/pgpool2/pcp.conf -D" |
37 |
LOGFILE="/var/log/pgpool2.log" |
38 |
|
39 |
start() { |
40 |
ebegin "Starting pgpool2" |
41 |
- |
42 |
- if [ -n "${RC_UNAME}" ]; then |
43 |
- PARAMS="--background --stdout '${LOGFILE}' --stderr '${LOGFILE}' -- ${ARGS}" |
44 |
- else |
45 |
- PARAMS="-- ${ARGS} >> '${LOGFILE}' 2>&1" |
46 |
- fi |
47 |
- |
48 |
- start-stop-daemon --start --quiet --background --exec /usr/bin/pgpool ${PARAMS} |
49 |
+ /usr/bin/pgpool ${ARGS} >> "${LOGFILE}" 2>&1 |
50 |
eend $? |
51 |
} |
52 |
|
53 |
stop() { |
54 |
ebegin "Stopping pgpool2" |
55 |
- start-stop-daemon --stop --quiet --exec /usr/bin/pgpool |
56 |
+ /usr/bin/pgpool -m fast stop >> "${LOGFILE}" 2>&1 |
57 |
eend $? |
58 |
} |
59 |
|
60 |
restart() { |
61 |
- stop |
62 |
+ svc_stop |
63 |
sleep 3 |
64 |
- start |
65 |
+ svc_start |
66 |
} |