pgsql
This commit is contained in:
parent
931cc0bc84
commit
015f2c2d8e
|
@ -1,16 +1,4 @@
|
|||
#!/bin/sh
|
||||
########################################################################
|
||||
# Begin /etc/init.d/postgresql
|
||||
#
|
||||
# Description : Start PostgreSQL Server
|
||||
#
|
||||
# Author : Ken Moffat - ken@linuxfromscratch.org
|
||||
#
|
||||
# Version : LFS 7.0
|
||||
#
|
||||
# Notes : Based on the earlier version by Gerard Beekmans
|
||||
#
|
||||
########################################################################
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: PostgreSQL
|
||||
|
@ -27,17 +15,17 @@
|
|||
|
||||
. /lib/lsb/init-functions
|
||||
|
||||
#$LastChangedBy: krejzi $
|
||||
#$Date: 2013-05-12 11:47:06 -0500 (Sun, 12 May 2013) $
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
log_info_msg "Starting PostgreSQL daemon..."
|
||||
|
||||
[ ! -d /srv/pgsql/data ] && install -v -dm700 /srv/pgsql/data &&
|
||||
[ ! -d /srv/pgsql/data ] && install -v -dm755 /run/postgresql &&
|
||||
chown -Rv postgres:postgres /srv/pgsql /run/postgresql
|
||||
|
||||
# ilk başlatma ayarları
|
||||
if [ ! -d /srv/pgsql/data ];then
|
||||
install -v -dm700 /srv/pgsql/data
|
||||
install -v -dm755 /run/postgresql
|
||||
su - postgres -c '/usr/bin/initdb -D /srv/pgsql/data'
|
||||
chown -Rv postgres:postgres /srv/pgsql /run/postgresql
|
||||
fi
|
||||
su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \
|
||||
-l /srv/pgsql/data/logfile -o "-i" '
|
||||
evaluate_retval
|
||||
|
|
Loading…
Reference in New Issue