Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdXnl-0003UB-Vh for pgsql-pkg-yum@arkaria.postgresql.org; Sun, 20 Sep 2015 06:08:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZdXnl-0005XJ-AG for pgsql-pkg-yum@arkaria.postgresql.org; Sun, 20 Sep 2015 06:08:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zd6g9-0003fE-TV for pgsql-pkg-yum@postgresql.org; Sat, 19 Sep 2015 01:11:02 +0000 Received: from forward16m.cmail.yandex.net ([5.255.216.147]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Zd6g5-0000vf-Sj for pgsql-pkg-yum@postgresql.org; Sat, 19 Sep 2015 01:11:00 +0000 Received: from web30m.yandex.ru (web30m.yandex.ru [37.140.138.121]) by forward16m.cmail.yandex.net (Yandex) with ESMTP id 0361820C40; Sat, 19 Sep 2015 04:10:52 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web30m.yandex.ru (Yandex) with ESMTP id 6622C2861953; Sat, 19 Sep 2015 04:10:52 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1442625052; bh=2yVYv66+/HIkd87gqxyxXZWrHbn4X7St4pgWsW8W7zk=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=kE2d/ZmTtgDgPJP3/FpM6vSPFolDvb9a5/lVKhyoKGfLzygnfX/uOFkkmNnwIujGa vk14KcNfZWpISwuD/UgDyfq6s5dXhpLZUv24D4yLEkL4jWp3wLbpLZJ9c83+wJmmdl dV/n2LVnA5nLysXhLVy8VC2NdeBbJ8pqexAxDD50= Received: by web30m.yandex.ru with HTTP; Sat, 19 Sep 2015 04:10:51 +0300 From: Andrew N Golovkov Envelope-From: andor000@yandex.ru To: Jeff Frost Cc: "pgsql-pkg-yum@postgresql.org" In-Reply-To: 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> Subject: Re: init script for pgpool MIME-Version: 1.0 Message-Id: <362161442625051@web30m.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 19 Sep 2015 04:10:51 +0300 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=utf-8 X-Pg-Spam-Score: -2.3 (--) 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 Awesome! Thanks! 19.09.2015, 02:00, "Jeff Frost" : > This should address all your concerns: > > http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/9.2/pgpool-II/EL-6/pgpool.init;hb=jf/pgpool_fixes_3 > >>  On Sep 18, 2015, at 3:26 PM, Andrew N Golovkov wrote: >> >>  git diff -b: https://bpaste.net/show/89b37acb8f0a >> >>  Removed `switch' action, because not supported at least from 3.3.3, where init-script changed in upstream; >> >>  Every call stop/start/reload with correct calls and use variable `$PGPOOLUSER' >>  Removed unhandled arguments from `failure' and `success' function calls; >>  Cleanup useless commands and exit's. >> >>  Every line aligned with tabs; >> >>  Version in comment is 3.4 as proposed Devrim. >> >>  19.09.2015, 00:50, "Jeff Frost" : >>>   Could you use diff -b so it doesn’t show lines with just whitespace different? >>> >>>>    On Sep 18, 2015, at 2:46 PM, Andrew N Golovkov wrote: >>>> >>>>    And again. >>>> >>>>    https://bpaste.net/show/20ee48a0fc81 >>>> >>>>    Diff with your script and my (with little cosmetic changes from previous version). >>>> >>>>    18.09.2015, 23:45, "Jeff Frost" : >>>>>    http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/9.2/pgpool-II/EL-6/pgpool.init;hb=jf/pgpool_fixes_3 >>>>> >>>>>>     On Sep 18, 2015, at 12:23 PM, Andrew N Golovkov wrote: >>>>>> >>>>>>     You load /etc/sysconfig/pgpool file _before_ you set variables like PGPOOLUSER and other. >>>>>>     Also you set PGPOOLUSER but run commands with hardcoded `postgres' user: >>>>>>>     $SU -l postgres -c "$PGPOOLDAEMON -f $PGPOOLCONF $OPTS & " >> "$PGPOOLLOG" 2>&1 < /dev/null >>>>>> >>>>>>     Please, look at my script i'v posted today. >>>>>> >>>>>>     18.09.2015, 20:17, "Jeff Frost" : >>>>>>>     Nice catch! I found a couple other things as well, so here’s an updated version: >>>>>>> >>>>>>>     http://git.postgresql.org/gitweb/?p=pgrpms.git;a=blob_plain;f=rpm/redhat/9.2/pgpool-II/EL-6/pgpool.init;hb=jf/pgpool_fixes_3 >>>>>>> >>>>>>>     It seems to work in my vagrant, so let me know if it works for you and I’ll get it merged, then the next time we build, we’ll have it in the repo. >>>>>>> >>>>>>>>      On Sep 18, 2015, at 5:40 AM, Andrew N Golovkov wrote: >>>>>>>> >>>>>>>>      You forget $pidfile and $PGPOOLUSER and some more comments. >>>>>>>> >>>>>>>>      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.org) >>>>>>>>      To make changes to your subscription: >>>>>>>>      http://www.postgresql.org/mailpref/pgsql-pkg-yum >>>>>>> >>>>>>>     --- >>>>>>>     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/ >>> >>>   --- >>>   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/ -- 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