Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZdXnB-0003T5-Qx for pgsql-pkg-yum@arkaria.postgresql.org; Sun, 20 Sep 2015 06:08:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZdXnB-0005TZ-Cq for pgsql-pkg-yum@arkaria.postgresql.org; Sun, 20 Sep 2015 06:08:05 +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 1Zd47C-0000Iw-Pa for pgsql-pkg-yum@postgresql.org; Fri, 18 Sep 2015 22:26:46 +0000 Received: from forward13.mail.yandex.net ([95.108.130.120]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Zd475-0006Ey-GQ for pgsql-pkg-yum@postgresql.org; Fri, 18 Sep 2015 22:26:45 +0000 Received: from web8j.yandex.ru (web8j.yandex.ru [IPv6:2a02:6b8:0:1619::308]) by forward13.mail.yandex.net (Yandex) with ESMTP id 39B0214134D; Sat, 19 Sep 2015 01:26:37 +0300 (MSK) Received: from 127.0.0.1 (localhost [127.0.0.1]) by web8j.yandex.ru (Yandex) with ESMTP id 91B8112136E; Sat, 19 Sep 2015 01:26:36 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1442615196; bh=UVlnGCYpTCDMFA7Mt4MIQpQ+WSo7F/Hyanh/tMaA14c=; h=From:To:Cc:In-Reply-To:References:Subject:Date; b=nF1HRBnyXt+8O4BjhU6mVWK7K/5bXkPAwORYAZT9fgu01FTQ8Zuu3sXQ6eRVMejlg Go6aSsnS0ieXCXAy3+Szzr4wNvTsi4zV3WWqLShn9nibPXLr1XWU6PKbYBfLVwYGTT Fl3UE2qxfuee8MaX1nqmAlsldY1+XHiWardLfms8= Received: by web8j.yandex.ru with HTTP; Sat, 19 Sep 2015 01:26:35 +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> Subject: Re: init script for pgpool MIME-Version: 1.0 Message-Id: <236381442615195@web8j.yandex.ru> X-Mailer: Yamail [ http://yandex.ru ] 5.0 Date: Sat, 19 Sep 2015 01:26:35 +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 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/ -- 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