From: | "Martin A(dot) Marques" <martin(at)math(dot)unl(dot)edu(dot)ar> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | problems with startup script on upgrade |
Date: | 2001-03-16 19:47:54 |
Message-ID: | 01031616475402.20898@math.unl.edu.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I just compiled and installed postgresql from the cvs (upgraded from 7.1beta5
becuase of some problems I had), followed the steps, and the database server
works great, but my startup scripts don't work anymore.
What the script has, works if I try to do it as postgres, but with a
su -l postgres -c 'command' as root it doesn't work.
This is the script (on Solaris 7):
#!/bin/bash
# postgresql This is the init script for starting up the PostgreSQL
# server
#
# chkconfig: 345 85 15
# description: Starts and stops the PostgreSQL backend daemon that handles \
# all database requests.
# processname: postmaster
#
# This script is slightly unusual in that the name of the daemon (postmaster)
# is not the same as the name of the subsystem (postgresql)
# See how we were called.
case "$1" in
start)
echo -n "Starting postgresql service: "
su -l postgres -c '/dbs/postgres/bin/pg_ctl -o "-i" -D /dbs/postgres/data/
start -l /dbs/postgres/sql.log'
;;
stop)
echo -n "Stopping postgresql service: "
su -l postgres -c '/dbs/postgres/bin/pg_ctl -m i -D /dbs/postgres/data stop'
echo
;;
status)
su -l postgres -c '/dbs/postgres/bin/pg_ctl -D /dbs/postgres/data/ status'
;;
restart)
$0 stop
sleep 10
$0 start
;;
*)
echo "Usage: postgresql {start|stop|status|restart}"
exit 1
esac
exit 0
--
System Administration: It's a dirty job,
but someone told me I had to do it.
-----------------------------------------------------------------
Martín Marqués email: martin(at)math(dot)unl(dot)edu(dot)ar
Santa Fe - Argentina http://math.unl.edu.ar/~martin/
Administrador de sistemas en math.unl.edu.ar
-----------------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-03-16 19:58:38 | Re: Problems with outer joins in 7.1beta5 |
Previous Message | Jan Wieck | 2001-03-16 19:40:24 | Re: Performance monitor signal handler |