Ignore:
Timestamp:
03/28/2004 01:46:42 AM (20 years ago)
Author:
Tushar Teredesai <tushar@…>
Branches:
10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 6.0, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, v5_1, v5_1-pre1, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
Children:
fe88f584
Parents:
ff023d1
Message:

More2 bootscript changes

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1941 af4574ff-66df-0310-9fd7-8a98e5e911e0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • content/databases/postgresql/postgresql-config.xml

    rff023d1 rae9c528  
    1515url="file:///usr/share/doc/postgresql/html/index.html"/>.</para>
    1616
    17 <para>Create the boot script with the following: </para>
    18 
    19 <screen><userinput><command>cat &gt; /etc/rc.d/init.d/postgresql &lt;&lt; "EOF"</command>
    20 #!/bin/sh
    21 # Begin $rc_base/init.d/postgresql
    22 
    23 # Based on sysklogd script from LFS-3.1 and earlier.
    24 # Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
    25 
    26 . /etc/sysconfig/rc
    27 . $rc_functions
    28 
    29 case "$1" in
    30         start)
    31                 echo "Starting PostgreSQL daemon..."
    32                 su - postgres -c '/usr/bin/pg_ctl start -W -D /var/pgsql/data \
    33                                -l /var/pgsql/data/logfile -o "-i" '
    34                 evaluate_retval
    35                 ;;
    36 
    37         stop)
    38                 echo "Stopping PostgreSQL daemon..."
    39                 /usr/bin/pg_ctl stop -m smart -D /var/pgsql/data
    40                 evaluate_retval
    41                 ;;
    42 
    43         restart)
    44                 $0 stop
    45                 sleep 1
    46                 $0 start
    47                 ;;
    48 
    49         status)
    50                 /usr/bin/pg_ctl status -D /var/pgsql/data
    51                 ;;
    52 
    53         *)
    54                 echo "Usage: $0 {start|stop|restart|status}"
    55                 exit 1
    56                 ;;
    57 esac
    58 
    59 # End $rc_base/init.d/
    60 <command>EOF
    61 chmod 755 /etc/rc.d/init.d/postgresql</command></userinput></screen>
    62 
    63 <para>Create the symbolic links to this file in the relevant
    64 <filename class="directory">rc.d</filename> directory
    65 with the following commands:</para>
    66 
    67 <screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
    68 ln -sf ../init.d/postgresql ../rc0.d/K26postgresql &amp;&amp;
    69 ln -sf ../init.d/postgresql ../rc1.d/K26postgresql &amp;&amp;
    70 ln -sf ../init.d/postgresql ../rc2.d/K26postgresql &amp;&amp;
    71 ln -sf ../init.d/postgresql ../rc3.d/S34postgresql &amp;&amp;
    72 ln -sf ../init.d/postgresql ../rc4.d/S34postgresql &amp;&amp;
    73 ln -sf ../init.d/postgresql ../rc5.d/S34postgresql &amp;&amp;
    74 ln -sf ../init.d/postgresql ../rc6.d/K26postgresql</command></userinput></screen>
     17<para>Install <filename>/etc/rc.d/init.d/postgresql</filename>
     18init script included in the <xref linkend="intro-important-bootscripts"/> package.</para>
     19                                                                                                               
     20<screen><userinput><command>make install-postgresql</command></userinput></screen>
    7521
    7622</sect3>
Note: See TracChangeset for help on using the changeset viewer.