startup script for FreeBSD 6.1

From: zz_11(at)mail(dot)bg
To: pgsql-admin(at)postgresql(dot)org
Subject: startup script for FreeBSD 6.1
Date: 2006-07-25 13:56:46
Message-ID: 1153835806.4be9ee1569974@mail.bg
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi,
I know it is stupied, but I can not resolve my problem.

I am using postgresql on many servers ( > 200).
I install it on FreeBSD and till version 6.1 it worked
perfect.

I do not use ports from FreeBSD. I install it from sources.
Also 3 y. ago I got from postgres web site a startup script
for FreeBSD and it worked well.

But after installing FreeBSD on my next DB server I make a
copy of my startup script to /usr/local/etc/rc.d and after
system restart pg do not started alone.

If I login as root and execute
/usr/local/etc/rc.d/postgres.sh start, all is ok.

I can not find the reason for this mistake.

My questions :
- Exists some one using postgresql and FreeBSD 6.1 ? If yes
pls. send me your startup script.
- Point me to any direction to find the problem ( my pg
version is 8.1.4). I wrote to FreeBSD mailing list without
any reaction till now.

Many thanks,
Ivan.

Also this is my startup script:

# ls -l /usr/local/etc/rc.d/postgres.sh
-rwxr-xr-x 1 root wheel 1327 Jul 24 21:25
/usr/local/etc/rc.d/postgres.sh

#! /bin/sh

# PostgreSQL boot time startup script for FreeBSD. Copy
this file to
# /usr/local/etc/rc.d/postgresql.

# Created through merger of the Linux start script by Ryan
Kirkpatrick
# and the script in the FreeBSD ports collection.

# $Header:
/cvsroot/pgsql-server/contrib/start-scripts/freebsd,v 1.2
2001/04/19 19:17:44 petere Exp $

## EDIT FROM HERE

# PROVIDE: postgresql

# Installation prefix
prefix=/usr

# Data directory
PGDATA="/usr/mydb"

# Who to run pg_ctl as, should be "postgres".
PGUSER=postgres

# Where to keep a log file
PGLOG="$PGDATA/postgres.log"

## 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="$prefix/bin/pg_ctl"

test -x "$DAEMON" || exit 0

case $1 in
start)
su -l $PGUSER -c "$DAEMON start -D '$PGDATA' -s -l
$PGLOG"
echo -n ' postgresql'
;;
stop)
su -l $PGUSER -c "$DAEMON stop -D '$PGDATA' -s -m
fast"
;;
restart)
su -l $PGUSER -c "$DAEMON restart -D '$PGDATA' -s
-m
fast"
;;
status)
su -l $PGUSER -c "$DAEMON status -D '$PGDATA'"
;;
*)
# Print help
echo "Usage: Basename $0
{start|stop|restart|status}" 1>&2
exit 1
;;
esac

exit 0

-----------------------------

ВСЕКИ ДЕН най-новото за цифровите технологии
http://www.digital.bg

Browse pgsql-admin by date

  From Date Subject
Next Message Aaron Bono 2006-07-25 14:53:28 Re: Out of memory when vacuuming
Previous Message Tom Lane 2006-07-25 12:09:05 Re: Checking what is the current query running