<?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 How to execute a script at startup in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911632#M107441</link>
    <description>Hi, I'm the admin of a HP9000 with hp-ux 10.20 and I want to run a service at startup automatically, because I'm tired to run it manually when I reboot the server.&lt;BR /&gt;&lt;BR /&gt;I've also a sun server and I put the scripts I want to run automatically at startup in /etc/init.d but I don't know how to do it in hp-ux.&lt;BR /&gt;&lt;BR /&gt;Thanx for the help I hope to receive,</description>
    <pubDate>Mon, 24 Feb 2003 15:19:51 GMT</pubDate>
    <dc:creator>Juanjo_1</dc:creator>
    <dc:date>2003-02-24T15:19:51Z</dc:date>
    <item>
      <title>How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911632#M107441</link>
      <description>Hi, I'm the admin of a HP9000 with hp-ux 10.20 and I want to run a service at startup automatically, because I'm tired to run it manually when I reboot the server.&lt;BR /&gt;&lt;BR /&gt;I've also a sun server and I put the scripts I want to run automatically at startup in /etc/init.d but I don't know how to do it in hp-ux.&lt;BR /&gt;&lt;BR /&gt;Thanx for the help I hope to receive,</description>
      <pubDate>Mon, 24 Feb 2003 15:19:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911632#M107441</guid>
      <dc:creator>Juanjo_1</dc:creator>
      <dc:date>2003-02-24T15:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911633#M107442</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;This related link should cover all the steps involved.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0fdefef4d250d611abdb0090277a778c,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x0fdefef4d250d611abdb0090277a778c,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;rgds, Robin</description>
      <pubDate>Mon, 24 Feb 2003 15:24:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911633#M107442</guid>
      <dc:creator>Robin Wakefield</dc:creator>
      <dc:date>2003-02-24T15:24:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911634#M107443</link>
      <description>on hpux you put it in /sbin/init.d/&lt;BR /&gt;&lt;BR /&gt;The config file for your script in /etc/rc.config.d/filename.&lt;BR /&gt;&lt;BR /&gt;In filename you set variable to 0 or 1.&lt;BR /&gt;&lt;BR /&gt;with 1 set it will start at boottime.</description>
      <pubDate>Mon, 24 Feb 2003 15:24:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911634#M107443</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2003-02-24T15:24:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911635#M107444</link>
      <description>Hi Juanjo,&lt;BR /&gt;&lt;BR /&gt;In HP-UX you use /sbin/init.d.&lt;BR /&gt;Place your script there &amp;amp; then link it to the dir for the necessary run level /sbin/rc2.d, /sbin/rc3.d, etc.&lt;BR /&gt;Call the file whatever you want in /sbin/init.d, but the links should be of the following format&lt;BR /&gt;&lt;BR /&gt;Start script =&amp;gt; SXXXname&lt;BR /&gt;Stop scipt =&amp;gt; KXXXname&lt;BR /&gt;&lt;BR /&gt;where XXX=three digits like S725name. The digits control the order or execution. Take a look at any of the scripts already there for proper file syntax. You normally need at least 4 sections, stop, start, stop_message &amp;amp; start_message. These scripts should require NO input nor terminal to run.&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 24 Feb 2003 15:26:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911635#M107444</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2003-02-24T15:26:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911636#M107445</link>
      <description>&lt;BR /&gt;put the startup script in /sbin/init.d&lt;BR /&gt;&lt;BR /&gt;lets call this script sc01&lt;BR /&gt;&lt;BR /&gt;Then create a symbolic link &lt;BR /&gt;&lt;BR /&gt;  /sbin/rc2.d/Sxxxsc01 &lt;BR /&gt;to&lt;BR /&gt;  /sbin/init.d/sc01&lt;BR /&gt;where&lt;BR /&gt;  xxx is a number you can choose.&lt;BR /&gt;&lt;BR /&gt;When the system boots up and enters run-level 2 all scripts in /sbin/rc2.d will be executed, so will be your Sxxxsc01&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;Rainer&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 15:27:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911636#M107445</guid>
      <dc:creator>Rainer von Bongartz</dc:creator>
      <dc:date>2003-02-24T15:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911637#M107446</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Look at the scripts in /sbin/init.d directory for examples. When the system comes up, it will start the scripts under /sbin/rc*.d that start with S* depending on the run level. Also during the shutdown, it brings down the processes using the scripts K* under the /sbin/rc*.d again. These are nothing but links to /sbin/init.d scripts.&lt;BR /&gt;&lt;BR /&gt;So, keep your script in /sbin/init.d. Create links from /sbin/rc?.d for both K* and S* ? being the run level that you wish to run this script at. &lt;BR /&gt;&lt;BR /&gt;You can also keep a switch file in /etc/rc.config.d. Define a variable in the script that gets set with /etc/rc.config.d. Again, you can look at the files under this directory and see how they control the behaviour of the scripts /sbin/init.d directory.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Mon, 24 Feb 2003 15:27:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911637#M107446</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-02-24T15:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911638#M107447</link>
      <description>The startup script should be in /sbin/init.d and it's best that you use the file "template" in this directory to build your script. The script will look for a control file in /etc/rc.config.d which has a variable in it to enable (set to 1) or disable (set to 0) the script upon startup.&lt;BR /&gt;Then create the appropriate symbolic link in /sbin/rc2.d (assuming you want to start this script up at run level 2). Use the last startup sequence number. For instance if say S900ems is the existing last startup script then use S901&lt;YOUR-SCRIPT&gt;&lt;/YOUR-SCRIPT&gt;You can manually test the script by running ..&lt;BR /&gt;# /sbin/init.d/myprogram start&lt;BR /&gt;to start it up .. and ..&lt;BR /&gt;# /sbin/init.d/myprogram stop&lt;BR /&gt;to stop it.</description>
      <pubDate>Mon, 24 Feb 2003 15:31:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911638#M107447</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2003-02-24T15:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute a script at startup</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911639#M107448</link>
      <description>There is a file in /usr/share/doc called start_up.txt which contains all the information you need to set this up.&lt;BR /&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;</description>
      <pubDate>Mon, 24 Feb 2003 15:46:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/how-to-execute-a-script-at-startup/m-p/2911639#M107448</guid>
      <dc:creator>melvyn burnard</dc:creator>
      <dc:date>2003-02-24T15:46:40Z</dc:date>
    </item>
  </channel>
</rss>

