repmgr.service

From: Justin King <jcking(at)mtu(dot)edu>
To: pgsql-pkg-yum(at)postgresql(dot)org
Subject: repmgr.service
Date: 2015-11-14 01:59:27
Message-ID: CAL3i3zT1NXVTyO=jOSXTnj3Uch9T569-LMyehDrUYqn0X+g2=w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-pkg-yum

Please modify the repmgr-9.x.service files for the packages.

The service files currently have:

ExecStop=/usr/bin/kill -TERM ${PIDFILE}
> ExecReload=/usr/bin/kill -HUP ${PIDFILE}

/bin/kill does not accept files, you may be thinking of /bin/pkill -f

Replace them with:

ExecStop=/usr/bin/kill -TERM $MAINPID
> ExecReload=/usr/bin/kill -HUP $MAINPID

$MAINPID is a special systemd provided variable that references the known
PID of the process

And add the following under the [Service] section:

PIDFile=/var/run/repmgr/repmgrd-9.x.pid

This prevents systemd from guessing what the PID is and being wrong when
Type=forking

As it stands now `systemctl stop repmgrd` and `systemctl reload repmgrd`
will always fail.

Justin

Responses

Browse pgsql-pkg-yum by date

  From Date Subject
Next Message rafael 2015-11-17 08:35:26 Re: Get PgBackMan into yum.postgresql.org
Previous Message Scott Mugnaini 2015-11-13 01:54:53 Re: PostGIS 2.2