openbsd-ports/databases/pgbouncer/pkg/pgbouncer.rc
sthen 91faa22c52 Where a program with an rc script _requires_ a certain command line
parameter to daemonize, move the parameter from daemon to daemon_flags,
so that the user cannot inadvertently prevent it from daemonizing by
adjusting the flags.

Discussed with ajacoutot and schwarze, this method was suggested
by schwarze@ as a simpler alternative to my diff. ok aja@
2011-12-17 22:01:12 +00:00

15 lines
286 B
Bash

#!/bin/sh
#
# $OpenBSD: pgbouncer.rc,v 1.3 2011/12/17 22:01:12 sthen Exp $
daemon="${TRUEPREFIX}/bin/pgbouncer -d"
daemon_flags="-q -u _pgbouncer ${SYSCONFDIR}/pgbouncer/pgbouncer.ini"
. /etc/rc.d/rc.subr
rc_pre() {
/usr/bin/install -d -o _pgbouncer /var/run/pgbouncer
}
rc_cmd $1