startup script for FreeBSD 6.1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux