]> git.pld-linux.org Git - packages/postgresql.git/commitdiff
- ALLOW_TCP_CONNECTIONS option is back
authorwrobell <wrobell@pld-linux.org>
Fri, 25 May 2001 14:33:54 +0000 (14:33 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- postgresql restart applies new configuration options from
  /etc/sysconfig/postgresql

Changed files:
    postgresql.init -> 1.23

postgresql.init

index 653181b44d50bb067f14b8e7e17ac5343b0e15c2..8b9bcf2116f09a6411688a95cc1144ed297833f9 100644 (file)
@@ -64,9 +64,17 @@ case "$1" in
                msg_starting PostgreSQL 
                busy
                PGSQL_CMDLINE="$([ -n "$POSTGRES_DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
-                   $([ "$POSTGRES_QUIET". = yes. ] && echo '-s -o -S') \
-                   $([ "$POSTGRES_DISABLE_FSYNC". = yes. ] && echo '-o -F')";
-               su postgres -c "/usr/bin/pg_ctl start $PGSQL_CMDLINE -l $POSTGRES_LOG 2>&1 >/dev/null"
+                   $([ "$POSTGRES_QUIET". = yes. ] && echo '-s')";
+               POSTMASTER_OPTIONS=" \
+                   $([ "$POSTGRES_QUIET". = yes. ] && echo '-S') \
+                   $([ "$POSTGRES_DISABLE_FSYNC". = yes. ] && echo '-F') \
+                   $([ "$ALLOW_TCP_CONNECTIONS". = yes. ] && echo '-i')";
+
+               su postgres -c "\
+                       $(echo "/usr/bin/pg_ctl start $PGSQL_CMDLINE -l $POSTGRES_LOG") \
+                       $([ "$POSTMASTER_OPTIONS". != . ] && echo "-o '$POSTMASTER_OPTIONS'") \
+                       $(echo "2>&1 >/dev/null")";
+
                out=`status postmaster`
                if [ $? -eq 0 ]; then 
                    deltext; ok
@@ -78,6 +86,7 @@ case "$1" in
        touch /var/lock/subsys/postgresql
        ;;
   stop)
+
        if [ ! -f /var/lock/subsys/postgresql ]; then
                msg_Not_Running PostgreSQL
                exit 0  
@@ -108,10 +117,19 @@ case "$1" in
        fi
        msg_reloading postgreSQL
        busy
+
        PGSQL_CMDLINE="$([ -n "$POSTGRES_DATA_DIR" ] && echo "-D $POSTGRES_DATA_DIR") \
-               $([ "$POSTGRES_QUIET". = yes. ] && echo '-s -o -S') \
-               $([ "$POSTGRES_DISABLE_FSYNC". = yes. ] && echo '-o -F')";
-       su postgres -c "/usr/bin/pg_ctl restart $PGSQL_CMDLINE -m fast 2>&1 >/dev/null"
+           $([ "$POSTGRES_QUIET". = yes. ] && echo '-s')";
+       POSTMASTER_OPTIONS=" \
+           $([ "$POSTGRES_QUIET". = yes. ] && echo '-S') \
+           $([ "$POSTGRES_DISABLE_FSYNC". = yes. ] && echo '-F') \
+           $([ "$ALLOW_TCP_CONNECTIONS". = yes. ] && echo '-i')";
+
+       su postgres -c "\
+               $(echo "/usr/bin/pg_ctl restart $PGSQL_CMDLINE -l $POSTGRES_LOG") \
+               $([ "$POSTMASTER_OPTIONS". != . ] && echo "-o '$POSTMASTER_OPTIONS'") \
+               $(echo "2>&1 >/dev/null")";
+
        out=`status postmaster`
        if [ $? -eq 0 ]; then
                deltext; ok
This page took 0.090123 seconds and 4 git commands to generate.