job000,
vou te ajudar a fazer um rc (código abaixo) para que você controle e starte no boot o postgresql, mas...lembrando que:
- você dar permissão de execução para esse arquivo (chmod 744)
- coloca-lo em /etc/init.d/ com o nome de rcpostgre
- você pode contrala-lo com:
rcpostgre start, status e stop
obs.: o rcpostgre status ainda é improvisado, vou achar uma forma mais prescisa.
- coloque
#! /bin/sh
# script RC para o ProFTPD
# Autor: Decio M. Vaz (atmozphera%gmail.com)
. /etc/rc.status
### BEGIN INIT INFO
# Provides: ftpd
# Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Description: Start the ftpd daemon
### END INIT INFO
# Shell functions sourced from /etc/rc.status:
# rc_check check and set local and overall rc status
# rc_status check and set local and overall rc status
# rc_status -v ditto but be verbose in local rc status
# rc_status -v -r ditto and clear the local rc status
# rc_failed set local and overall rc status to failed
# rc_reset clear local rc status (overall remains)
# rc_exit exit appropriate to overall rc status
# First reset status of this service
rc_reset
case "$1" in
start)
echo -n "Starting PostgreSQL Server"
## Start daemon with startproc(8). If this fails
## the echo return value is set appropriate.
#startproc /usr/sbin/foo
/usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data
# Remember status and be verbose
rc_status -v
;;
stop)
echo -n "Shutting Down PostgreSQL Server"
## Stop daemon with killproc(8) and if this fails
## set echo the echo return value.
/usr/bin/killall postmaster
#killproc -TERM /usr/sbin/foo
# Remember status and be verbose
rc_status -v
;;
restart)
## If first returns OK call the second, if first or
## second command fails, set echo return value.
$0 stop && $0 start
# Remember status and be quiet
rc_status
;;
reload)
## Choose ONE of the following two cases:
## First possibility: A few services accepts a signal
## to reread the (changed) configuration.
#echo -n "Reload service foo"
#killproc -HUP /usr/sbin/foo
#rc_status -v
## Exclusive possibility: Some services must be stopped
## and started to force a new load of the configuration.
#$0 stop && $0 start
# Remember status and be verbose
#rc_status -v
;;
status)
echo -n "Checking FTP Server status: "
ps auwx | grep postmaster
## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.
#checkproc /usr/sbin/foo && echo OK || echo No process
;;
*)
echo "Usage: $0 {start|stop|status}"
exit 1
;;
esac
rc_exit