I can't start postgres using a modified form of the startup script
supplied in the contrib directory. I keep getting an error from su
saying that "D is an invalid option."
Below is the entire script:
> #! /bin/sh
>
> # This is an example of a start/stop script for SysV-style init, such
> # as is used on Linux systems. You should edit some of the variables
> # and maybe the 'echo' commands.
> #
> # chkconfig: 2345 85 15
> #
> # description: A control script for the postmaster daemon
> #
>
>
> # Installation prefix
> DIR=/usr/local/pgsql
>
> # Data directory
> PGDATA=/usr/local/pgsql/data
>
> # Who to run pg_ctl as, should be "postgres".
> PGUSER=postgres
>
> # Where to keep a log file
> PGLOG=$PGDATA/serverlog
>
> ## STOP EDITING HERE
>
> # The path that is to be used for the script
> PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
>
> # What to use to start up the postmaster
> DAEMON=$DIR/bin/pg_ctl
>
> set -e
>
> # Only start if we can find pg_ctl.
> test -f $DAEMON || exit 0
>
> # Sorce 'em up
> . /etc/rc.d/init.d/functions
>
> # Parse command line parameters.
> case $1 in
> start)
> action "Starting PostgreSQL: " su -l $PGUSER -c "$DAEMON start -D '$PGDATA'
>-l $PGLOG"
> ;;
> stop)
> action "Stopping PostgreSQL: " su -l $PGUSER -c "$DAEMON stop -D '$PGDATA'
>-m smart"
> ;;
> restart)
> action "Restarting PostgreSQL: " su -l $PGUSER -c "$DAEMON restart -D
>'$PGDATA' -m smart"
> ;;
> status)
> su -l $PGUSER -c "$DAEMON status -D '$PGDATA'"
> ;;
> *)
> # Print help
> echo "Usage: $0 {start|stop|restart|status}" 1>&2
> exit 1
> ;;
> esac
>
> exit 0
>
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to [EMAIL PROTECTED] so that your
message can get through to the mailing list cleanly