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