diff options
Diffstat (limited to 'postgresql-ctl.in')
-rw-r--r-- | postgresql-ctl.in | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/postgresql-ctl.in b/postgresql-ctl.in index ad18004..569e4d3 100644 --- a/postgresql-ctl.in +++ b/postgresql-ctl.in @@ -22,9 +22,10 @@ # such extension, not the server itself). test -n "$PGSCLS" && source scl_source enable $PGSCLS -port=() -if test "$1" = "start" && test -n "$PGPORT"; then - port=(-o "-p $PGPORT") -fi +opts=() +test "$1" = "start" && test -n "$PGOPTS" && opts=(-o "$PGOPTS") -exec @bindir@/pg_ctl "$@" "${port[@]}" +# cleanup possibly empty PGPORT +test -z "$PGPORT" && unset PGPORT + +exec @bindir@/pg_ctl "$@" "${opts[@]}" |