[Snort-users] Postgres question

Kevin.Brown at ...1022... Kevin.Brown at ...1022...
Mon Mar 5 17:48:23 EST 2001


I tried something like that in the postgresql init file that came with the
rpm's and it just chokes when I try to start postgres (or restart since it's
running).  The following is the line I tried to modify and doing so cause it
to not start up:

su -l postgres -c '/usr/bin/pg_ctl -D $PGDATA -p /usr/bin/postmaster start
-o "-o -F" >/dev/null 2>&1' < /dev/null

> > I setup postgres today for snort to log to and got it working, then found an
> > email in the archive regarding getting postgres to faster (e.g. closer to
> > mysql's speed), but I'm not quite certain how to do it.
> 
> Here's my pgsql init -- you'll also note the TZ envar, I had problems
> with pgsql on FreeBSD and the timezone I'm in -- there's a funky bug
> with Postgres thinking CST US is CST AUS instead. :)
> 
> 
> --shawn
> 
> 
> 
> 
> 
> ------------- snip , snip ------------
> 
> 
> 
> 
> case $1 in
> start)
>     [ -d /usr/local/pgsql/lib ] && /sbin/ldconfig -m
> /usr/local/pgsql/lib
>     [ -x /usr/local/pgsql/bin/pg_ctl ] && {
>         su -l pgsql -c \
>             'export TZ=CST;exec /usr/local/pgsql/bin/pg_ctl -w start -o
> "-o -F -i" > /usr/local/pgsql/errlog 2>&1'
>         echo -n ' pgsql'
>     }
>     ;;
> 
> stop)
>     [ -x /usr/local/pgsql/bin/pg_ctl ] && {
>         su -l pgsql -c 'exec /usr/local/pgsql/bin/pg_ctl -w -m fast
> stop'
>     }
>     ;;
> 
> status)
>     [ -x /usr/local/pgsql/bin/pg_ctl ] && {
>         su -l pgsql -c 'exec /usr/local/pgsql/bin/pg_ctl status'
>     }
>     ;;
> 
> *)
>     echo "usage: `basename $0` {start|stop|status}" >&2
>     exit 64
>     ;;
> esac
> 





More information about the Snort-users mailing list