diff options
Diffstat (limited to 'databases/postgresql73-server/files/pgsql.sh.tmpl')
-rw-r--r-- | databases/postgresql73-server/files/pgsql.sh.tmpl | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/databases/postgresql73-server/files/pgsql.sh.tmpl b/databases/postgresql73-server/files/pgsql.sh.tmpl index cd78771..d67d9b6 100644 --- a/databases/postgresql73-server/files/pgsql.sh.tmpl +++ b/databases/postgresql73-server/files/pgsql.sh.tmpl @@ -4,28 +4,32 @@ # # For postmaster startup options, edit $PGDATA/postgresql.conf -PGBIN=%%PREFIX%%/%%PG_PREFIX%%bin +PREFIX=%%PREFIX%% +PGBIN=${PREFIX}/bin case $1 in start) - [ -d %%PREFIX%%/%%PG_PREFIX%%lib ] && /sbin/ldconfig -m %%PREFIX%%/%%PG_PREFIX%%lib + [ -d ${PREFIX}/lib ] && /sbin/ldconfig -m ${PREFIX}/lib + touch /var/log/pgsql + chmod 600 /var/log/pgsql + chown pgsql:pgsql /var/log/pgsql [ -x ${PGBIN}/pg_ctl ] && { su -l pgsql -c \ - '[ -d ${PGDATA} ] && exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl start -s -w -l ~pgsql/errlog' + '[ -d ${PGDATA} ] && exec %%PREFIX%%/bin/pg_ctl start -s -w -l /var/log/pgsql' echo -n ' pgsql' } ;; stop) [ -x ${PGBIN}/pg_ctl ] && { - su -l pgsql -c 'exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl stop -s -m fast' + su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl stop -s -m fast' echo -n ' pgsql' } ;; status) [ -x ${PGBIN}/pg_ctl ] && { - exec su -l pgsql -c 'exec %%PREFIX%%/%%PG_PREFIX%%bin/pg_ctl status' + exec su -l pgsql -c 'exec %%PREFIX%%/bin/pg_ctl status' } ;; |