<?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: Question about setting a program to startup automatically in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898733#M820343</link>
    <description>Here's the bit of code you need,...&lt;BR /&gt;&lt;BR /&gt;  if [ -f /etc/rc.config ] ; then&lt;BR /&gt;                . /etc/rc.config&lt;BR /&gt;    else&lt;BR /&gt;                echo "ERROR: /etc/rc.config defaults file MISSING"&lt;BR /&gt;    fi&lt;BR /&gt;&lt;BR /&gt;(Stolen from /sbin/init.d/sendmail).&lt;BR /&gt;&lt;BR /&gt;The above command looks for /etc/rc.config.d/[script name] ('netbackup' in your case) and then runs it to load the variables set.&lt;BR /&gt;&lt;BR /&gt;After that variable is loaded, you can interrogate it within the start script.&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;# $Header: /kahlua_src/web/server/etc/webadmin 72.1 1999/09/16 03:51:04 lancer Exp $ &lt;BR /&gt;# WebAdmin application server configuration.  &lt;BR /&gt;#&lt;BR /&gt;# WEBADMIN:             Set to 1 to start the WebAdmin application server. &lt;BR /&gt;#&lt;BR /&gt;WEBADMIN=0&lt;BR /&gt;&lt;BR /&gt;(Example stolen from /etc/rc.config.d/webadmin)&lt;BR /&gt;&lt;BR /&gt;Create your script in the file /sbin/init.d/netbackup, perform an 'ln -s' command to link it into /sbin/rc3.d/S[999]netbackup and /sbin/rc2.d/K[111]netbackup.&lt;BR /&gt;&lt;BR /&gt;Easy peasy! Share and Enjoy! Ian</description>
    <pubDate>Thu, 06 Feb 2003 18:34:05 GMT</pubDate>
    <dc:creator>Ian Dennison_1</dc:creator>
    <dc:date>2003-02-06T18:34:05Z</dc:date>
    <item>
      <title>Question about setting a program to startup automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898730#M820340</link>
      <description>Hi everyone,&lt;BR /&gt;&lt;BR /&gt;I have a question about starting up an application automatically. I am fully aware that when you want to start up an application at boot time that you have to have a corresponding /etc/rc.config.d file for the app you want to start and set it to 1. &lt;BR /&gt;&lt;BR /&gt;With that being said, i am attaching a script which is the S777netbackup startup script from my system's /sbin/init.d directory and what I want to know is how i can input a section into this script which will check a variable at startup time that the file exist in /etc/rc.config.d for startup of this application automatically.&lt;BR /&gt;&lt;BR /&gt;example:&lt;BR /&gt;&lt;BR /&gt;/etc/rc.config.d/netbackup&lt;BR /&gt;&lt;BR /&gt;RUN_NETBACKUP=1&lt;BR /&gt;&lt;BR /&gt;If I have this file in place in the rc.config.d directory how can I put something into the S777netbackup script that will allow it to read this other file in rc.config.d and startup the application automatically.&lt;BR /&gt;&lt;BR /&gt;Sorry for the long post.&lt;BR /&gt;&lt;BR /&gt;fg.&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Feb 2003 17:54:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898730#M820340</guid>
      <dc:creator>fg_1</dc:creator>
      <dc:date>2003-02-06T17:54:25Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting a program to startup automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898731#M820341</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am not writing the script portion as you know how to write it.&lt;BR /&gt;&lt;BR /&gt;You just need to put a check in your netbackup init.d script to see if RUN_NETBACKUP in rc.config.d/netbackup has been set to 1. If so, run your startup|shutdown command  otherwise exit.&lt;BR /&gt;&lt;BR /&gt;Take an example script (like cron) and see how it has been setup and you will get a good idea.&lt;BR /&gt;&lt;BR /&gt;-Sri</description>
      <pubDate>Thu, 06 Feb 2003 17:59:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898731#M820341</guid>
      <dc:creator>Sridhar Bhaskarla</dc:creator>
      <dc:date>2003-02-06T17:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting a program to startup automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898732#M820342</link>
      <description>Check other S###xxxxx start scripts in /sbin/rc2.d or wherever.  Most of them check for the existence of a file in /etc/rc.config.d, and check the go/no-go parameter if it exists.&lt;BR /&gt;&lt;BR /&gt;It should be simple to add more or less the same commands into the top of your script, to basically:&lt;BR /&gt;&lt;BR /&gt;if exists, &lt;BR /&gt;  then&lt;BR /&gt;    if run=1&lt;BR /&gt;    then continue&lt;BR /&gt;    else exit&lt;BR /&gt;  else continue&lt;BR /&gt;continue...&lt;BR /&gt;&lt;BR /&gt;Are you looking for an actual working version of your script back that does this?  I don't have time right now, but maybe later, let me know if this helps, or if that's what you are looking for.&lt;BR /&gt;&lt;BR /&gt;Regards, --bmr</description>
      <pubDate>Thu, 06 Feb 2003 18:05:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898732#M820342</guid>
      <dc:creator>Brian M Rawlings</dc:creator>
      <dc:date>2003-02-06T18:05:09Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting a program to startup automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898733#M820343</link>
      <description>Here's the bit of code you need,...&lt;BR /&gt;&lt;BR /&gt;  if [ -f /etc/rc.config ] ; then&lt;BR /&gt;                . /etc/rc.config&lt;BR /&gt;    else&lt;BR /&gt;                echo "ERROR: /etc/rc.config defaults file MISSING"&lt;BR /&gt;    fi&lt;BR /&gt;&lt;BR /&gt;(Stolen from /sbin/init.d/sendmail).&lt;BR /&gt;&lt;BR /&gt;The above command looks for /etc/rc.config.d/[script name] ('netbackup' in your case) and then runs it to load the variables set.&lt;BR /&gt;&lt;BR /&gt;After that variable is loaded, you can interrogate it within the start script.&lt;BR /&gt;&lt;BR /&gt;#!/sbin/sh&lt;BR /&gt;# $Header: /kahlua_src/web/server/etc/webadmin 72.1 1999/09/16 03:51:04 lancer Exp $ &lt;BR /&gt;# WebAdmin application server configuration.  &lt;BR /&gt;#&lt;BR /&gt;# WEBADMIN:             Set to 1 to start the WebAdmin application server. &lt;BR /&gt;#&lt;BR /&gt;WEBADMIN=0&lt;BR /&gt;&lt;BR /&gt;(Example stolen from /etc/rc.config.d/webadmin)&lt;BR /&gt;&lt;BR /&gt;Create your script in the file /sbin/init.d/netbackup, perform an 'ln -s' command to link it into /sbin/rc3.d/S[999]netbackup and /sbin/rc2.d/K[111]netbackup.&lt;BR /&gt;&lt;BR /&gt;Easy peasy! Share and Enjoy! Ian</description>
      <pubDate>Thu, 06 Feb 2003 18:34:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898733#M820343</guid>
      <dc:creator>Ian Dennison_1</dc:creator>
      <dc:date>2003-02-06T18:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Question about setting a program to startup automatically</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898734#M820344</link>
      <description>fg -&lt;BR /&gt; I know this is more and less than what you are asking, but I am attaching the doc we used for starting a process.&lt;BR /&gt;We found this very straight forward and you can literally call any script. In your case, maybe one to perform the dependency checks you require.&lt;BR /&gt;Also note in the document, the non destructive way to test your SXXX script for errors.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;dl</description>
      <pubDate>Thu, 06 Feb 2003 18:52:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/question-about-setting-a-program-to-startup-automatically/m-p/2898734#M820344</guid>
      <dc:creator>Dave La Mar</dc:creator>
      <dc:date>2003-02-06T18:52:05Z</dc:date>
    </item>
  </channel>
</rss>

