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 printf "Starting postgresql: "
16 su
- postgres
-c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
20 printf "Stopping postgresql: "
21 su
- postgres
-c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast'
40 echo "Usage: $0 {start|stop|restart}"