[Snort-users] Postgres question

shawn . moyer shawn at ...1184...
Mon Mar 5 16:53:29 EST 2001


Kevin.Brown at ...1022... wrote:
 
> 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