Re: startup script for FreeBSD

From: Alfred Perlstein <bright(at)wintelcom(dot)net>
To: Eduardo Kotujansky <eduardo(at)complex(dot)com(dot)br>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: startup script for FreeBSD
Date: 2000-11-23 19:31:53
Message-ID: 20001123113153.Y18037@fw.wintelcom.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

* Eduardo Kotujansky <eduardo(at)complex(dot)com(dot)br> [001123 04:25] wrote:
> Could some one send-me an example ( or tell-me where it is in docs )
> of a shell script for start postgresql in a FreeBSD installation
>
> Thanks
> Eduardo

this could be more modular, and you'll want to lower the -B and -S
options unless you have a gig of RAM.

#!/bin/sh

#
# /usr/local/etc/rc.d startup script
#
# $Wintelcom: src/paycounter_backend/dbscripts/pg.sh,v 1.4 2000/07/04 09:13:49 bright Exp $
#

DATA=/vol/amrd0/database/data
DAEMON=/usr/local/pgsql/bin/postmaster
LOGFILE=/vol/amrd0/database/data/postgres.log
PGUSER=pgsql

case `/usr/bin/whoami` in
root)
if [ -d /usr/local/pgsql/lib ] ; then
/sbin/ldconfig -m /usr/local/pgsql/lib
fi
su -l $PGUSER -c \
"exec $DAEMON -i -B 32768 -D$DATA -S -o "-F -S 65534" > $LOGFILE"
;;
$PGUSER)
$DAEMON -i -B 32768 -D$DATA -S -o "-F -S 65534" > $LOGFILE
;;
*)
echo you either need to be root or $PGUSER to start postgresql
exit
;;
esac

--
-Alfred Perlstein - [bright(at)wintelcom(dot)net|alfred(at)freebsd(dot)org]
"I have the heart of a child; I keep it in a jar on my desk."

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message GH 2000-11-23 19:44:15 [NOVICE] Skipping numbers in a sequence.
Previous Message GH 2000-11-23 19:21:40 Re: re : PHP and persistent connections