8 if [ ! -f /var/lib/pgsql/PG_VERSION ]; then
9 echo "Initializing postgresql data base..."
10 su - postgres -c '/usr/bin/pg_ctl initdb -D /var/lib/pgsql'
15 echo -n "Starting postgresql: "
16 su - postgres -c '/usr/bin/pg_ctl start -D /var/lib/pgsql -l logfile'
20 echo -n "Stopping postgresql: "
21 su - postgres -c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast'
40 echo "Usage: $0 {start|stop|restart}"