daemon fails on startup because pid file does not exist

Ole ole at free.de
Fri Aug 31 07:22:17 UTC 2018


Hi,

I use databases/postgresql-repmgr for database replication. Now the
daemon won't start if the pid file /var/run/repmgrd.pid does not exists.

so before start i have to run

	touch /var/run/repmgrd.pid
	chown postgres:postgres /var/run/repmgrd.pid

Is this a problem of the daemon process, of the init script or of my
setup? The init-script is below.

thanks 
Ole


#!/bin/sh

# $FreeBSD: head/databases/postgresql-repmgr/files/repmgrd.in 458407 2018-01-08 12:55:59Z bofh $
#
# PROVIDE: repmgrd
# REQUIRE: postgresql
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf to enable this
# service:
#
# repmgrd_enable (bool):   Set to YES to enable repmgrd.  Default: NO
#
# repmgrd_config (path):   Default: /usr/local/etc/repmgr.conf
#

. /etc/rc.subr

name=repmgrd
rcvar=repmgrd_enable

load_rc_config $name

: ${repmgrd_enable:="NO"}
: ${repmgrd_user:="pgsql"}
: ${repmgrd_config="/usr/local/etc/repmgr.conf"}

command=/usr/local/bin/${name}
pidfile=/var/run/${name}.pid

command_args="-m -d -p $pidfile -f $repmgrd_config"

run_rc_command "$1"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digitale Signatur von OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20180831/b27566e3/attachment.sig>


More information about the freebsd-questions mailing list