Viitor_postgresql/etc/init.d/postgresql
kueller 2941530728 V961 Tree Umbau
git-svn-id: svn://svn.compuextreme.de/Viitor/V961/Viitor_postgresql@4305 504e572c-2e33-0410-9681-be2bf7408885
2008-05-03 16:59:08 +00:00

54 lines
1.4 KiB
Bash

#!/bin/sh
#<Scriptname> des systemvinit prozesses
#Script Framework - Automatisiertes Erzeugen der Monsum Linux Distribution
#(c) Rainmaker MultiMedia OHG
#
#$Author$
#$Date$
#$Revision$
#
#$Log$
#Revision 1.6 2003/04/19 07:49:53 kueller
#Nicht ufnktionierende Optionene status und reload entfernt
#
#Revision 1.5 2001/11/03 20:37:46 segler
#
#Variable PGNET (Option -i bzw. nix) in /etc/sysconfig/profile.d/PostgreSQL eingefuehrt. Wenn auskommentiert passiert nix, wenn nicht horcht postgres auf Netzverbindungen auf Port 5432
#
#Revision 1.3 2001/10/10 19:28:37 kueller
#Fehler korrekturen:
#source /etc/sysconfig/profile.d/postgresql ->falsch geschrieben - PostgreSQL
#loadproc muß postmaster bei verwendung von su mit absolutem Pfad starten
#
#Revision 1.2 2001/10/08 08:35:35 kueller
#cvs header korrigiert
#
#
source /etc/init.d/functions
source /etc/sysconfig/profile.d/PostgreSQL
case "$1" in
start)
echo -n "Starting PostgreSQL"
su - postgres -c "/opt/PostgreSQL/bin/postmaster $PGNET -D $PGDATA &"
;;
stop)
echo -n "Stopping PostgreSQL"
killproc postmaster
;;
restart)
$0 stop
/usr/bin/sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
;;
esac