From: | Dmitry Samersoff <dms(at)wplus(dot)net> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | Files ... |
Date: | 1999-08-26 16:43:14 |
Message-ID: | XFMail.990826204314.dms@wplus.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
This is three files IMHO useful for community
1. SysV start script for postgres, also can be used under freebsd
(see below)
2. simple utility su_postgres, it make su to user postgres whether or not
shell for it specified, is better than su for security reason
3. configure/configure.in checking for ps style
BSD ps -ax or SysV ps -e
Probably, there is the reason to include it (after some improvement0 into
distribution.
---
Dmitry Samersoff, dms(at)wplus(dot)net, ICQ:3161705
http://devnull.wplus.net
* There will come soft rains ...
============================================================================
#ident "@(#)/etc/init.d/pgsql 1.0 26/08/99 dms"
PG_HOME="/usr/local/pgsql"
PG_DATA="$PG_HOME/data"
UDS="/tmp/.s.PGSQL.5432"
PS="@PS@"
GREP="@GREP@"
case "$1" in
'start')
# If no postgres run, remove UDS and start postgres.
pid=
set -- `$PS | $GREP postmaster | $GREP -v grep`
[ $? -eq 0 ] && pid=$1
if [ -z "$pid" ]; then
rm -f "$UDS"
$PG_HOME/bin/su_postgres "$PG_HOME/bin/postmaster -D $PG_DATA
-b $PG_HOME/bin/postgres -i -S -o -F &"
echo "Postgres started"
else
echo "Postmaster already run with pid $pid"
fi
;;
'stop')
pid=
set -- `$PS | $GREP postmaster | $GREP -v grep`
[ $? -eq 0 ] && pid=$1
if [ -z "$pid" ]; then
echo "Postgres not run"
else
echo "Stoping postmaster with pid $pid"
kill $pid
fi
;;
*)
echo "USAGE: $0 {start | stop}"
;;
esac
Attachment | Content-Type | Size |
---|---|---|
pg_run.tar.gz | application/octet-stream | 9.2 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-08-26 18:39:07 | PG FAQ in PDF format |
Previous Message | Clayton Cottingham | 1999-08-25 22:55:41 | out of memory errors |