aboutsummaryrefslogtreecommitdiff
path: root/databases/postgresql74-server/files/pgsql.sh.tmpl
diff options
context:
space:
mode:
authorSean Chittenden <seanc@FreeBSD.org>2003-12-04 12:00:49 +0000
committerSean Chittenden <seanc@FreeBSD.org>2003-12-04 12:00:49 +0000
commit8a928af72d1ebb839a332158c27129b8a154275e (patch)
treec658c0da17e05366791dbe372c9e966663a70265 /databases/postgresql74-server/files/pgsql.sh.tmpl
parent75d6fb12df9343cebb166dc9ac575ae77c24dd4d (diff)
downloadports-8a928af72d1ebb839a332158c27129b8a154275e.tar.gz
ports-8a928af72d1ebb839a332158c27129b8a154275e.zip
Notes
Diffstat (limited to 'databases/postgresql74-server/files/pgsql.sh.tmpl')
-rw-r--r--databases/postgresql74-server/files/pgsql.sh.tmpl20
1 files changed, 11 insertions, 9 deletions
diff --git a/databases/postgresql74-server/files/pgsql.sh.tmpl b/databases/postgresql74-server/files/pgsql.sh.tmpl
index 0d85d6fba25d..3f8706d6af0c 100644
--- a/databases/postgresql74-server/files/pgsql.sh.tmpl
+++ b/databases/postgresql74-server/files/pgsql.sh.tmpl
@@ -9,30 +9,32 @@
PREFIX=%%PREFIX%%
PGBIN=${PREFIX}/bin
-logfile=/var/log/pgsql
case $1 in
start)
- touch ${logfile}
- chmod 600 ${logfile}
- chown pgsql:pgsql ${logfile}
[ -x ${PGBIN}/pg_ctl ] && {
- su -l pgsql -c \
- "[ -d \${PGDATA} ] && exec ${PREFIX}/bin/pg_ctl start -s -w -l ${logfile}"
echo -n ' pgsql'
+ su -l pgsql -c \
+ "[ -d \${PGDATA} ] && exec ${PREFIX}/bin/pg_ctl start -s -w"
}
;;
stop)
[ -x ${PGBIN}/pg_ctl ] && {
- su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl stop -s -m fast"
echo -n ' pgsql'
+ su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl stop -s -m fast"
}
;;
restart)
[ -x ${PGBIN}/pg_ctl ] && {
- exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast -l ${logfile}"
+ exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl restart -s -m fast"
+ }
+ ;;
+
+reload)
+ [ -x ${PGBIN}/pg_ctl ] && {
+ exec su -l pgsql -c "exec ${PREFIX}/bin/pg_ctl reload"
}
;;
@@ -43,7 +45,7 @@ status)
;;
*)
- echo "usage: `basename $0` {start|stop|restart|status}" >&2
+ echo "usage: `basename $0` {start|stop|restart|reload|status}" >&2
exit 64
;;
esac