problems with startup script on upgrade
От | Martin A. Marques |
---|---|
Тема | problems with startup script on upgrade |
Дата | |
Msg-id | 01031616475402.20898@math.unl.edu.ar обсуждение исходный текст |
Ответы |
Re: problems with startup script on upgrade
|
Список | 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 stopsleep 10$0 start;; *)echo "Usage: postgresql {start|stop|status|restart}"exit1 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@math.unl.edu.ar Santa Fe - Argentina http://math.unl.edu.ar/~martin/ Administrador de sistemas en math.unl.edu.ar -----------------------------------------------------------------
В списке pgsql-hackers по дате отправления: