This commit is contained in:
milisbir 2018-06-13 05:25:57 +02:00
parent 931cc0bc84
commit 015f2c2d8e
1 changed files with 7 additions and 19 deletions

View File

@ -1,16 +1,4 @@
#!/bin/sh #!/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 ### BEGIN INIT INFO
# Provides: PostgreSQL # Provides: PostgreSQL
@ -27,17 +15,17 @@
. /lib/lsb/init-functions . /lib/lsb/init-functions
#$LastChangedBy: krejzi $
#$Date: 2013-05-12 11:47:06 -0500 (Sun, 12 May 2013) $
case "$1" in case "$1" in
start) start)
log_info_msg "Starting PostgreSQL daemon..." log_info_msg "Starting PostgreSQL daemon..."
[ ! -d /srv/pgsql/data ] && install -v -dm700 /srv/pgsql/data && # ilk başlatma ayarları
[ ! -d /srv/pgsql/data ] && install -v -dm755 /run/postgresql && 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 chown -Rv postgres:postgres /srv/pgsql /run/postgresql
fi
su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \ su - postgres -c '/usr/bin/pg_ctl start -W -D /srv/pgsql/data \
-l /srv/pgsql/data/logfile -o "-i" ' -l /srv/pgsql/data/logfile -o "-i" '
evaluate_retval evaluate_retval