Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zd4dn-00021w-3N for pgsql-pkg-yum@arkaria.postgresql.org; Fri, 18 Sep 2015 23:00:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zd4dl-00032Y-Dx for pgsql-pkg-yum@arkaria.postgresql.org; Fri, 18 Sep 2015 23:00:25 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zd4dk-00032P-22 for pgsql-pkg-yum@postgresql.org; Fri, 18 Sep 2015 23:00:24 +0000 Received: from smtp72.ord1c.emailsrvr.com ([108.166.43.72]) by magus.postgresql.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84) (envelope-from ) id 1Zd4db-0005ZH-Rw for pgsql-pkg-yum@postgresql.org; Fri, 18 Sep 2015 23:00:23 +0000 Received: from smtp2.relay.ord1c.emailsrvr.com (localhost.localdomain [127.0.0.1]) by smtp2.relay.ord1c.emailsrvr.com (SMTP Server) with ESMTP id 013811801E2; Fri, 18 Sep 2015 19:00:12 -0400 (EDT) Received: by smtp2.relay.ord1c.emailsrvr.com (Authenticated sender: jeff.frost-AT-pgexperts.com) with ESMTPSA id BD02418032C; Fri, 18 Sep 2015 19:00:12 -0400 (EDT) X-Sender-Id: jeff.frost@pgexperts.com Received: from [10.10.10.15] (8.202-62-69.ftth.swbr.surewest.net [69.62.202.8]) (using TLSv1 with cipher DHE-RSA-AES256-SHA) by 0.0.0.0:587 (trex/5.4.2); Fri, 18 Sep 2015 23:00:12 GMT Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: init script for pgpool From: Jeff Frost In-Reply-To: <236381442615195@web8j.yandex.ru> Date: Fri, 18 Sep 2015 16:00:11 -0700 Cc: "pgsql-pkg-yum@postgresql.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <306581442235608@web6m.yandex.ru> <280191442580051@web12h.yandex.ru> <89FABBBA-D585-4AA9-889F-962595C2DE1A@pgexperts.com> <1964951442604225@web16j.yandex.ru> <1325321442612766@web4j.yandex.ru> <236381442615195@web8j.yandex.ru> To: Andrew N Golovkov X-Mailer: Apple Mail (2.2104) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-pkg-yum Precedence: bulk Sender: pgsql-pkg-yum-owner@postgresql.org This should address all your concerns: http://git.postgresql.org/gitweb/?p=3Dpgrpms.git;a=3Dblob_plain;f=3Drpm/red= hat/9.2/pgpool-II/EL-6/pgpool.init;hb=3Djf/pgpool_fixes_3 > On Sep 18, 2015, at 3:26 PM, Andrew N Golovkov wrote: >=20 > git diff -b: https://bpaste.net/show/89b37acb8f0a >=20 > Removed `switch' action, because not supported at least from 3.3.3, where= init-script changed in upstream; >=20 > Every call stop/start/reload with correct calls and use variable `$PGPOOL= USER' > Removed unhandled arguments from `failure' and `success' function calls; > Cleanup useless commands and exit's. >=20 > Every line aligned with tabs; >=20 > Version in comment is 3.4 as proposed Devrim. >=20 > 19.09.2015, 00:50, "Jeff Frost" : >> Could you use diff -b so it doesn=E2=80=99t show lines with just whites= pace different? >>=20 >>> On Sep 18, 2015, at 2:46 PM, Andrew N Golovkov wrote: >>>=20 >>> And again. >>>=20 >>> https://bpaste.net/show/20ee48a0fc81 >>>=20 >>> Diff with your script and my (with little cosmetic changes from previ= ous version). >>>=20 >>> 18.09.2015, 23:45, "Jeff Frost" : >>>> http://git.postgresql.org/gitweb/?p=3Dpgrpms.git;a=3Dblob_plain;f=3D= rpm/redhat/9.2/pgpool-II/EL-6/pgpool.init;hb=3Djf/pgpool_fixes_3 >>>>=20 >>>>> On Sep 18, 2015, at 12:23 PM, Andrew N Golovkov w= rote: >>>>>=20 >>>>> You load /etc/sysconfig/pgpool file _before_ you set variables lik= e PGPOOLUSER and other. >>>>> Also you set PGPOOLUSER but run commands with hardcoded `postgres'= user: >>>>>> $SU -l postgres -c "$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & " >> "$P= GPOOLLOG" 2>&1 < /dev/null >>>>>=20 >>>>> Please, look at my script i'v posted today. >>>>>=20 >>>>> 18.09.2015, 20:17, "Jeff Frost" : >>>>>> Nice catch! I found a couple other things as well, so here=E2=80= =99s an updated version: >>>>>>=20 >>>>>> http://git.postgresql.org/gitweb/?p=3Dpgrpms.git;a=3Dblob_plain;f= =3Drpm/redhat/9.2/pgpool-II/EL-6/pgpool.init;hb=3Djf/pgpool_fixes_3 >>>>>>=20 >>>>>> It seems to work in my vagrant, so let me know if it works for yo= u and I=E2=80=99ll get it merged, then the next time we build, we=E2=80=99l= l have it in the repo. >>>>>>=20 >>>>>>> On Sep 18, 2015, at 5:40 AM, Andrew N Golovkov = wrote: >>>>>>>=20 >>>>>>> You forget $pidfile and $PGPOOLUSER and some more comments. >>>>>>>=20 >>>>>>> Check script in attach. I'm tested in my centos-6 and pgpool-II= -92. >>>>>>> -- >>>>>>> Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum@postgresql.o= rg) >>>>>>> To make changes to your subscription: >>>>>>> http://www.postgresql.org/mailpref/pgsql-pkg-yum >>>>>>=20 >>>>>> --- >>>>>> Jeff Frost >>>>>> CTO, PostgreSQL Experts, Inc. >>>>>> Phone: 1-888-PG-EXPRT x506 >>>>>> FAX: 415-762-5122 >>>>>> http://www.pgexperts.com/ >>>>=20 >>>> --- >>>> Jeff Frost >>>> CTO, PostgreSQL Experts, Inc. >>>> Phone: 1-888-PG-EXPRT x506 >>>> FAX: 415-762-5122 >>>> http://www.pgexperts.com/ >>=20 >> --- >> Jeff Frost >> CTO, PostgreSQL Experts, Inc. >> Phone: 1-888-PG-EXPRT x506 >> FAX: 415-762-5122 >> http://www.pgexperts.com/ --- Jeff Frost CTO, PostgreSQL Experts, Inc. Phone: 1-888-PG-EXPRT x506 FAX: 415-762-5122 http://www.pgexperts.com/=20 --=20 Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-pkg-yum