Re: init script for pgpool

From: Jeff Frost <jeff(at)pgexperts(dot)com>
To: Andrew N Golovkov <andor000(at)ya(dot)ru>
Cc: "pgsql-pkg-yum(at)postgresql(dot)org" <pgsql-pkg-yum(at)postgresql(dot)org>
Subject: Re: init script for pgpool
Date: 2015-09-18 23:00:11
Message-ID: B31AD711-3B3A-4D25-BCCF-5BF8426519A5@pgexperts.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

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 <andor000(at)ya(dot)ru> 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" <jeff(at)pgexperts(dot)com>:
>> 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 <andor000(at)ya(dot)ru> 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" <jeff(at)pgexperts(dot)com>:
>>>> 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 <andor000(at)ya(dot)ru> 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" <jeff(at)pgexperts(dot)com>:
>>>>>> 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 <andor000(at)ya(dot)ru> 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.<pgpool.init>
>>>>>>> --
>>>>>>> Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum(at)postgresql(dot)org)
>>>>>>> To make changes to your subscription:
>>>>>>> http://www.postgresql.org/mailpref/pgsql-pkg-yum
>>>>>>
>>>>>> ---
>>>>>> Jeff Frost <jeff(at)pgexperts(dot)com>
>>>>>> CTO, PostgreSQL Experts, Inc.
>>>>>> Phone: 1-888-PG-EXPRT x506
>>>>>> FAX: 415-762-5122
>>>>>> http://www.pgexperts.com/
>>>>
>>>> ---
>>>> Jeff Frost <jeff(at)pgexperts(dot)com>
>>>> CTO, PostgreSQL Experts, Inc.
>>>> Phone: 1-888-PG-EXPRT x506
>>>> FAX: 415-762-5122
>>>> http://www.pgexperts.com/
>>
>> ---
>> Jeff Frost <jeff(at)pgexperts(dot)com>
>> CTO, PostgreSQL Experts, Inc.
>> Phone: 1-888-PG-EXPRT x506
>> FAX: 415-762-5122
>> http://www.pgexperts.com/

---
Jeff Frost <jeff(at)pgexperts(dot)com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/

In response to

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message Andrew N Golovkov 2015-09-19 01:10:51 Re: init script for pgpool
Previous Message Andrew N Golovkov 2015-09-18 22:26:35 Re: init script for pgpool