From 015f2c2d8e6f6798c5571731d2c2cd6f049caf4c Mon Sep 17 00:00:00 2001 From: milisbir Date: Wed, 13 Jun 2018 05:25:57 +0200 Subject: [PATCH] pgsql --- ayarlar/servisler/mbd/init.d/postgresql | 26 +++++++------------------ 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/ayarlar/servisler/mbd/init.d/postgresql b/ayarlar/servisler/mbd/init.d/postgresql index a59f9c1e7..c56701311 100644 --- a/ayarlar/servisler/mbd/init.d/postgresql +++ b/ayarlar/servisler/mbd/init.d/postgresql @@ -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