mirror of
https://github.com/beard7n/bsdports.git
synced 2026-04-13 03:51:18 +02:00
42 lines
1019 B
Bash
42 lines
1019 B
Bash
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
PGBOUNCER_GROUP="%%PGBOUNCER_GROUP%%"
|
|
PGBOUNCER_OWNER="%%PGBOUNCER_OWNER%%"
|
|
|
|
PGBOUNCER_GROUP_ID="%%PGBOUNCER_GROUP_ID%%"
|
|
PGBOUNCER_OWNER_ID="%%PGBOUNCER_OWNER_ID%%"
|
|
|
|
PKG_PREFIX="%%PREFIX%%"
|
|
PGBOUNCER_RUNDIR="%%PGBOUNCER_RUNDIR%%"
|
|
PGBOUNCER_LOGDIR="%%PGBOUNCER_LOGDIR%%"
|
|
PGBOUNCER_NAME="pgbouncer"
|
|
PGBOUNCER_SHELL="/usr/sbin/nologin"
|
|
|
|
|
|
case $2 in
|
|
PRE-INSTALL)
|
|
|
|
|
|
pw group add ${PGBOUNCER_GROUP} -g ${PGBOUNCER_GROUP_ID}
|
|
pw group show ${PGBOUNCER_GROUP}
|
|
pw user add ${PGBOUNCER_OWNER} -u ${PGBOUNCER_OWNER_ID} \
|
|
-g ${PGBOUNCER_GROUP} \
|
|
-d ${PKG_PREFIX} \
|
|
-s "${PGBOUNCER_SHELL}" -u ${PGBOUNCER_OWNER_ID} \
|
|
-c "${PGBOUNCER_NAME}"
|
|
pw group mod ${PGBOUNCER_GROUP} -M ${PGBOUNCER_OWNER}
|
|
pw user show ${PGBOUNCER_OWNER}
|
|
pw group show ${PGBOUNCER_GROUP}
|
|
|
|
install -d -o ${PGBOUNCER_OWNER} -g ${PGBOUNCER_GROUP} -m 0755 ${PGBOUNCER_RUNDIR}
|
|
install -d -o ${PGBOUNCER_OWNER} -g ${PGBOUNCER_GROUP} -m 0755 ${PGBOUNCER_LOGDIR}
|
|
|
|
;;
|
|
POST-INSTALL)
|
|
;;
|
|
esac
|
|
exit 0
|
|
#EOF
|