<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: rc shutdown scripts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478051#M212906</link>
    <description>You probably don't want /sbin/rc0.d.  The number after the rc is the run level.  You most likely want run-level 3 (after networking is up).&lt;BR /&gt;&lt;BR /&gt;So, what you would do is put the start link in /sbin/rc3.d and the kill link in /sbin/rc2.d.  That way when the server transitioned into run level 3 (at bootup) it starts the application, and when it transitions to run level 2 (during shutdown) it executes the shutdown.&lt;BR /&gt;&lt;BR /&gt;First thing is the file in /sbin/init.d   This script should be able to start and stop the application depending on the argument.  /sbin/init.d/template can give you a starting ground to writing this type of script.&lt;BR /&gt;&lt;BR /&gt;To create the links (assuming your script name is myapp)&lt;BR /&gt;&lt;BR /&gt;ln - s /sbin/init.d/myapp /sbin/rc3.d/S&lt;NUMBER&gt;myapp&lt;BR /&gt;&lt;BR /&gt;ln -s /sbin/init.d/myapp /sbin/rc2.d/K&lt;NUMBER&gt;myapp&lt;BR /&gt;&lt;BR /&gt;The &lt;NUMBER&gt; in the above controls the order.  The higher the number the further in the process it occurs.  I was always taught that the S&lt;NUMBER&gt; + the K&lt;NUMBER&gt; should equal 1000.  So if you use S900, then it should be K100.  This helps to keep consistancy in the startup/shutdown.  I would suggest you use a high number like 900+ in order to allow all HP standard software to startup first.&lt;BR /&gt;&lt;BR /&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;</description>
    <pubDate>Thu, 03 Feb 2005 15:37:48 GMT</pubDate>
    <dc:creator>Gary L. Paveza, Jr.</dc:creator>
    <dc:date>2005-02-03T15:37:48Z</dc:date>
    <item>
      <title>rc shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478050#M212905</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I would like to shutdown a particular app upon reboot and need step by step instructions regarding how. We are using 11i.&lt;BR /&gt;&lt;BR /&gt;As I understand it, I can create my script in /sbin/init.d and then link this to /sbin/rc0.d. So for example, I have /sbin/init.d/stoptivoli. What do I do then? I never linked before. I know ultimately I'm supposed to end up with a K script in /sbin/rc0.d that links to /sbin/init.d/stoptivoli.&lt;BR /&gt;&lt;BR /&gt;Hope this makes sense...thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 03 Feb 2005 15:26:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478050#M212905</guid>
      <dc:creator>Steve Ferrara</dc:creator>
      <dc:date>2005-02-03T15:26:12Z</dc:date>
    </item>
    <item>
      <title>Re: rc shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478051#M212906</link>
      <description>You probably don't want /sbin/rc0.d.  The number after the rc is the run level.  You most likely want run-level 3 (after networking is up).&lt;BR /&gt;&lt;BR /&gt;So, what you would do is put the start link in /sbin/rc3.d and the kill link in /sbin/rc2.d.  That way when the server transitioned into run level 3 (at bootup) it starts the application, and when it transitions to run level 2 (during shutdown) it executes the shutdown.&lt;BR /&gt;&lt;BR /&gt;First thing is the file in /sbin/init.d   This script should be able to start and stop the application depending on the argument.  /sbin/init.d/template can give you a starting ground to writing this type of script.&lt;BR /&gt;&lt;BR /&gt;To create the links (assuming your script name is myapp)&lt;BR /&gt;&lt;BR /&gt;ln - s /sbin/init.d/myapp /sbin/rc3.d/S&lt;NUMBER&gt;myapp&lt;BR /&gt;&lt;BR /&gt;ln -s /sbin/init.d/myapp /sbin/rc2.d/K&lt;NUMBER&gt;myapp&lt;BR /&gt;&lt;BR /&gt;The &lt;NUMBER&gt; in the above controls the order.  The higher the number the further in the process it occurs.  I was always taught that the S&lt;NUMBER&gt; + the K&lt;NUMBER&gt; should equal 1000.  So if you use S900, then it should be K100.  This helps to keep consistancy in the startup/shutdown.  I would suggest you use a high number like 900+ in order to allow all HP standard software to startup first.&lt;BR /&gt;&lt;BR /&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;&lt;/NUMBER&gt;</description>
      <pubDate>Thu, 03 Feb 2005 15:37:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478051#M212906</guid>
      <dc:creator>Gary L. Paveza, Jr.</dc:creator>
      <dc:date>2005-02-03T15:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: rc shutdown scripts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478052#M212907</link>
      <description>Most user created startup commands go in run level 3. A few in run level 2.&lt;BR /&gt;&lt;BR /&gt;For oracle and other applications:&lt;BR /&gt;&lt;BR /&gt;S(tart) script goes in /sbin/rc3.d&lt;BR /&gt;K(ill) script goes in /sbin/rd2.d&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Thu, 03 Feb 2005 15:40:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/rc-shutdown-scripts/m-p/3478052#M212907</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-02-03T15:40:37Z</dc:date>
    </item>
  </channel>
</rss>

