Doc: fix indentation in scripts.
authorTatsuo Ishii <ishii@sraoss.co.jp>
Sun, 25 Aug 2019 02:37:35 +0000 (11:37 +0900)
committerTatsuo Ishii <ishii@sraoss.co.jp>
Sun, 25 Aug 2019 02:38:53 +0000 (11:38 +0900)
Auto indentation by commit 2cb0bd3f8f236aeacfba37cd4d604893561bad52
broke indentation of scripts in <programlisting> tag.

doc.ja/src/sgml/examples.sgml
doc/src/sgml/examples.sgml

index 341e0cd7ebfd158ab09e10014253cb011a749a7f..74f3338489f862023d47a1faae24b2c438e08421 100644 (file)
        /etc/pgpool-II/failover.sh
        </para>
        <programlisting>
-       #! /bin/sh -x
-       # Execute command by failover.
-       # special values:  %d = node id
-       #                  %h = host name
-       #                  %p = port number
-       #                  %D = database cluster path
-       #                  %m = new master node id
-       #                  %M = old master node id
-       #                  %H = new master node host name
-       #                  %P = old primary node id
-       #                  %R = new master database cluster path
-       #                  %r = new master port number
-       #                  %% = '%' character
-
-       falling_node=$1          # %d
-       old_primary=$2           # %P
-       new_primary=$3           # %H
-       pgdata=$4                # %R
-
-       pghome=/usr/pgsql-9.6
-       log=/var/log/pgpool/failover.log
-
-       date >> $log
-       echo "failed_node_id=$falling_node new_primary=$new_primary" >> $log
-
-       if [ $falling_node = $old_primary ]; then
-       if [ $UID -eq 0 ]
-       then
+#! /bin/sh -x
+# Execute command by failover.
+# special values:  %d = node id
+#                  %h = host name
+#                  %p = port number
+#                  %D = database cluster path
+#                  %m = new master node id
+#                  %M = old master node id
+#                  %H = new master node host name
+#                  %P = old primary node id
+#                  %R = new master database cluster path
+#                  %r = new master port number
+#                  %% = '%' character
+
+falling_node=$1          # %d
+old_primary=$2           # %P
+new_primary=$3           # %H
+pgdata=$4                # %R
+
+pghome=/usr/pgsql-9.6
+log=/var/log/pgpool/failover.log
+
+date >> $log
+echo "failed_node_id=$falling_node new_primary=$new_primary" >> $log
+
+if [ $falling_node = $old_primary ]; then
+    if [ $UID -eq 0 ]
+    then
         su postgres -c "ssh -T postgres@$new_primary $pghome/bin/pg_ctl promote -D $pgdata"
-       else
+    else
         ssh -T postgres@$new_primary $pghome/bin/pg_ctl promote -D $pgdata
-       fi
-       exit 0;
-       fi;
-       exit 0;
+    fi
+    exit 0;
+fi;
+exit 0;
        </programlisting>
       </listitem>
      </itemizedlist>
        /var/lib/pgsql/9.6/data/recovery_1st_stage
        </para>
        <programlisting>
-       #!/bin/bash -x
-       # Recovery script for streaming replication.
-
-       pgdata=$1
-       remote_host=$2
-       remote_pgdata=$3
-       port=$4
-
-       pghome=/usr/pgsql-9.6
-       archivedir=/var/lib/pgsql/archivedir
-       hostname=$(hostname)
-
-       ssh -T postgres@$remote_host "
-       rm -rf $remote_pgdata
-       $pghome/bin/pg_basebackup -h $hostname -U repl -D $remote_pgdata -x -c fast
-       rm -rf $archivedir/*
-
-       cd $remote_pgdata
-       cp postgresql.conf postgresql.conf.bak
-       sed -e 's/#*hot_standby = off/hot_standby = on/' postgresql.conf.bak > postgresql.conf
-       rm -f postgresql.conf.bak
-       cat > recovery.conf &lt;&lt; EOT
-       standby_mode = 'on'
-       primary_conninfo = 'host="$hostname" port=$port user=repl'
-       restore_command = 'scp $hostname:$archivedir/%f %p'
-       EOT
-       "
+#!/bin/bash -x
+# Recovery script for streaming replication.
+
+pgdata=$1
+remote_host=$2
+remote_pgdata=$3
+port=$4
+
+pghome=/usr/pgsql-9.6
+archivedir=/var/lib/pgsql/archivedir
+hostname=$(hostname)
+
+ssh -T postgres@$remote_host "
+rm -rf $remote_pgdata
+$pghome/bin/pg_basebackup -h $hostname -U repl -D $remote_pgdata -x -c fast
+rm -rf $archivedir/*
+
+cd $remote_pgdata
+cp postgresql.conf postgresql.conf.bak
+sed -e 's/#*hot_standby = off/hot_standby = on/' postgresql.conf.bak > postgresql.conf
+rm -f postgresql.conf.bak
+cat > recovery.conf &lt;&lt; EOT
+standby_mode = 'on'
+primary_conninfo = 'host="$hostname" port=$port user=repl'
+restore_command = 'scp $hostname:$archivedir/%f %p'
+EOT
+"
        </programlisting>
       </listitem>
       <listitem>
        /var/lib/pgsql/9.6/data/pgpool_remote_start
        </para>
        <programlisting>
-       #! /bin/sh -x
+#! /bin/sh -x
 
-       pghome=/usr/pgsql-9.6
-       remote_host=$1
-       remote_pgdata=$2
+pghome=/usr/pgsql-9.6
+remote_host=$1
+remote_pgdata=$2
 
-       # リカバリ先のPostgreSQLを起動
-       ssh -T $remote_host $pghome/bin/pg_ctl -w -D $remote_pgdata start > /dev/null 2>&1 < /dev/null &
+# リカバリ先のPostgreSQLを起動
+ssh -T $remote_host $pghome/bin/pg_ctl -w -D $remote_pgdata start > /dev/null 2>&1 < /dev/null &
        </programlisting>
       </listitem>
      </itemizedlist>
index bb032f7338e7dcc81bef329379680a558a696e62..a70b4d76386c94ea80af266e0144ef5849add55c 100644 (file)
        /etc/pgpool-II/failover.sh
        </para>
        <programlisting>
-       #! /bin/sh -x
-       # Execute command by failover.
-       # special values:  %d = node id
-       #                  %h = host name
-       #                  %p = port number
-       #                  %D = database cluster path
-       #                  %m = new master node id
-       #                  %M = old master node id
-       #                  %H = new master node host name
-       #                  %P = old primary node id
-       #                  %R = new master database cluster path
-       #                  %r = new master port number
-       #                  %% = '%' character
-
-       falling_node=$1          # %d
-       old_primary=$2           # %P
-       new_primary=$3           # %H
-       pgdata=$4                # %R
-
-       pghome=/usr/pgsql-9.6
-       log=/var/log/pgpool/failover.log
-
-       date >> $log
-       echo "failed_node_id=$falling_node new_primary=$new_primary" >> $log
-
-       if [ $falling_node = $old_primary ]; then
-       if [ $UID -eq 0 ]
-       then
-        su postgres -c "ssh -T postgres@$new_primary $pghome/bin/pg_ctl promote -D $pgdata"
-       else
+#! /bin/sh -x
+# Execute command by failover.
+# special values:  %d = node id
+#                  %h = host name
+#                  %p = port number
+#                  %D = database cluster path
+#                  %m = new master node id
+#                  %M = old master node id
+#                  %H = new master node host name
+#                  %P = old primary node id
+#                  %R = new master database cluster path
+#                  %r = new master port number
+#                  %% = '%' character
+
+falling_node=$1          # %d
+old_primary=$2           # %P
+new_primary=$3           # %H
+pgdata=$4                # %R
+
+pghome=/usr/pgsql-9.6
+log=/var/log/pgpool/failover.log
+
+date >> $log
+echo "failed_node_id=$falling_node new_primary=$new_primary" >> $log
+
+if [ $falling_node = $old_primary ]; then
+    if [ $UID -eq 0 ]
+    then
+       su postgres -c "ssh -T postgres@$new_primary $pghome/bin/pg_ctl promote -D $pgdata"
+    else
         ssh -T postgres@$new_primary $pghome/bin/pg_ctl promote -D $pgdata
-       fi
-       exit 0;
-       fi;
-       exit 0;
+    fi
+    exit 0;
+fi;
+exit 0;
        </programlisting>
       </listitem>
      </itemizedlist>
        /var/lib/pgsql/9.6/data/recovery_1st_stage
        </para>
        <programlisting>
-       #!/bin/bash -x
-       # Recovery script for streaming replication.
-
-       pgdata=$1
-       remote_host=$2
-       remote_pgdata=$3
-       port=$4
-
-       pghome=/usr/pgsql-9.6
-       archivedir=/var/lib/pgsql/archivedir
-       hostname=$(hostname)
-
-       ssh -T postgres@$remote_host "
-       rm -rf $remote_pgdata
-       $pghome/bin/pg_basebackup -h $hostname -U repl -D $remote_pgdata -x -c fast
-       rm -rf $archivedir/*
-
-       cd $remote_pgdata
-       cp postgresql.conf postgresql.conf.bak
-       sed -e 's/#*hot_standby = off/hot_standby = on/' postgresql.conf.bak > postgresql.conf
-       rm -f postgresql.conf.bak
-       cat > recovery.conf &lt;&lt; EOT
-       standby_mode = 'on'
-       primary_conninfo = 'host="$hostname" port=$port user=repl'
-       restore_command = 'scp $hostname:$archivedir/%f %p'
-       EOT
-       "
+#!/bin/bash -x
+# Recovery script for streaming replication.
+
+pgdata=$1
+remote_host=$2
+remote_pgdata=$3
+port=$4
+
+pghome=/usr/pgsql-9.6
+archivedir=/var/lib/pgsql/archivedir
+hostname=$(hostname)
+
+ssh -T postgres@$remote_host "
+rm -rf $remote_pgdata
+$pghome/bin/pg_basebackup -h $hostname -U repl -D $remote_pgdata -x -c fast
+rm -rf $archivedir/*
+
+cd $remote_pgdata
+cp postgresql.conf postgresql.conf.bak
+sed -e 's/#*hot_standby = off/hot_standby = on/' postgresql.conf.bak > postgresql.conf
+rm -f postgresql.conf.bak
+cat > recovery.conf &lt;&lt; EOT
+standby_mode = 'on'
+primary_conninfo = 'host="$hostname" port=$port user=repl'
+restore_command = 'scp $hostname:$archivedir/%f %p'
+EOT
+"
        </programlisting>
       </listitem>
       <listitem>
        /var/lib/pgsql/9.6/data/pgpool_remote_start
        </para>
        <programlisting>
-       #! /bin/sh -x
+#! /bin/sh -x
 
-       pghome=/usr/pgsql-9.6
-       remote_host=$1
-       remote_pgdata=$2
+pghome=/usr/pgsql-9.6
+remote_host=$1
+remote_pgdata=$2
 
-       # Start recovery target PostgreSQL server
-       ssh -T $remote_host $pghome/bin/pg_ctl -w -D $remote_pgdata start > /dev/null 2>&1 < /dev/null &
+# Start recovery target PostgreSQL server
+ssh -T $remote_host $pghome/bin/pg_ctl -w -D $remote_pgdata start > /dev/null 2>&1 < /dev/null &
        </programlisting>
       </listitem>
      </itemizedlist>