repmgr init script

From: Martín Marqués <martin(at)2ndquadrant(dot)com>
To: pgsql-pkg-yum(at)postgresql(dot)org
Subject: repmgr init script
Date: 2015-09-28 21:57:03
Message-ID: 5609B7AF.3010903@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

Hi all,

I've been going over the configuration of an already installed repmgr
cluster from PGDG rpms and found that the init-script doesn't seem to be
performing the correct commands.

I found a dangling dash which I have no idea what it's there for.

So, mainly I think the start exec should be changed to something like:

$SU -l $REPMGRD_USER -c "${REPMGRD_BIN} ${REPMGRD_OPTS} \
-p ${REPMGRD_PIDFILE} &" >> "${REPMGRD_LOG}" 2>&1 < /dev/null

This means having all the repmgrd options set in ${REPMGRD_OPTS} in a
sysconfig file instead of placing them one by one in the init script.

This would mean that all the configuration should be set in
sysconfig/repmgrd, not by editing the init script.

Attached is a patch for EL-6, plus the missing sysconfig file.

On EL-7 we need to have a nice systemd file. I'll see if I can get that
done later.

Also, the init script's service should be called repmgrd, not repmgr.

Kind regards,

--
Martín Marqués http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

Attachment Content-Type Size
repmgr.init.diff text/x-diff 2.3 KB
repmgrd.sysconfig text/plain 553 bytes

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message WHITMORE, MARK J GS-12 USAF AFMC 517 SMXS/MXDEC 2015-09-29 14:57:16 Download question
Previous Message Martín Marqués 2015-09-25 23:23:02 Re: Fedora 22