[MacPorts] #14083: compatibility improvement for
postgresql82-server
MacPorts
trac at macosforge.org
Sat Jan 26 15:28:29 PST 2008
#14083: compatibility improvement for postgresql82-server
--------------------------------+-------------------------------------------
Reporter: apinstein at mac.com | Owner: macports-tickets at lists.macosforge.org
Type: enhancement | Status: new
Priority: Normal | Milestone: Port Enhancements
Component: ports | Version: 1.6.0
Resolution: | Keywords:
--------------------------------+-------------------------------------------
Changes (by jmpp at macports.org):
* type: defect => enhancement
* milestone: => Port Enhancements
Old description:
> For starting/stopping the server, you should do:
>
> instead of
>
> su postgres -c "${PGCTL} -D
> ${POSTGRESQL82DATA:=/opt/local/var/db/postgresql82/defaultdb} start -l
> /opt/local/var/log/postgresql82/postgres.log"
>
> do
> sudo -u $PGUSER sh -c "${DAEMON} -D '${PGDATA}' | ${LOGUTIL} '${PGLOG}'
> ${ROTATESEC} &"
>
> The latter is the postgresql way now, and doesn't require the "postgres"
> user to have a login shell, which is more secure.
>
> Also, when creating the "postgresql" user, set the shell to
> /usr/bin/false.
New description:
For starting/stopping the server, you should do:
instead of
{{{
su postgres -c "${PGCTL} -D
${POSTGRESQL82DATA:=/opt/local/var/db/postgresql82/defaultdb} start -l
/opt/local/var/log/postgresql82/postgres.log"
}}}
do
{{{
sudo -u $PGUSER sh -c "${DAEMON} -D '${PGDATA}' | ${LOGUTIL} '${PGLOG}'
${ROTATESEC} &"
}}}
The latter is the postgresql way now, and doesn't require the "postgres"
user to have a login shell, which is more secure.
Also, when creating the "postgresql" user, set the shell to
`/usr/bin/false`.
--
Ticket URL: <http://trac.macosforge.org/projects/macports/ticket/14083#comment:1>
MacPorts </projects/macports>
Ports system for Mac OS
More information about the macports-tickets
mailing list