ncftp: bump version to 3.2.6
[buildroot-gz.git] / package / postgresql / S50postgresql
blob1ece4fca9e2c7377812fa60950b6eb386e023ecf
1 #!/bin/sh
3 # start postgresql
6 umask 077
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'
11 echo "done"
14 start() {
15 printf "Starting postgresql: "
16 su - postgres -c '/usr/bin/pg_ctl start -w -D /var/lib/pgsql -l logfile'
17 echo "OK"
19 stop() {
20 printf "Stopping postgresql: "
21 su - postgres -c '/usr/bin/pg_ctl stop -D /var/lib/pgsql -m fast'
22 echo "OK"
24 restart() {
25 stop
26 start
29 case "$1" in
30 start)
31 start
33 stop)
34 stop
36 restart|reload)
37 restart
40 echo "Usage: $0 {start|stop|restart}"
41 exit 1
42 esac
44 exit $?