<?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: starting a script whenever the system reboots in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169545#M63776</link>
    <description>still no points!!!</description>
    <pubDate>Tue, 01 Apr 2008 10:23:42 GMT</pubDate>
    <dc:creator>skt_skt</dc:creator>
    <dc:date>2008-04-01T10:23:42Z</dc:date>
    <item>
      <title>starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169541#M63772</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;I want to know how do we start a shell script when the system reboots.Should we include the path in /etc/init.d or should we include the path in some other place to start the script automatically.Please suggest.&lt;BR /&gt;&lt;BR /&gt;Thanks, in advance</description>
      <pubDate>Fri, 28 Mar 2008 06:28:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169541#M63772</guid>
      <dc:creator>Karthik_sg</dc:creator>
      <dc:date>2008-03-28T06:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169542#M63773</link>
      <description>Enable a script to start and stop a service at different runlevels using chkconfig&lt;BR /&gt;For a script to interact with chkconfig and the automatic starting and stopping of services at different run levels, it needs two key components. &lt;BR /&gt;&lt;BR /&gt;The first is a commented section that allows the script to be managed by the chkconfig tool. Here is an example: &lt;BR /&gt;&lt;BR /&gt;#!/bin/bash&lt;BR /&gt;&lt;BR /&gt;#&lt;BR /&gt;# chkconfig 345 10 90&lt;BR /&gt;# description This is where you put a description of your service&lt;BR /&gt;In this example, the numbers 345 after the chkconfig directive represent the runlevels that the service will be enabled for by default. In this example the service will be enabled by default for runlevels 3, 4, and 5. &lt;BR /&gt;&lt;BR /&gt;The 10 is the start priority. The lower the number the higher the priority and the sooner a service will be started. The 90 is the stop priority. The lower the number the higher the priority and the sooner a service will be stopped when changing runlevels. &lt;BR /&gt;&lt;BR /&gt;The second essential component is that the script must support being called with the arguments "start" and "stop." The script will be called with "start" as an argument when the service is being started at a given runlevel and "stop" when it is being stopped. Within these functions the script should touch a lock file in the /var/lock/subsys/ folder. If this is not done, the script will automatically start, but will not stop automatically. This should be done in the following manner: &lt;BR /&gt;&lt;BR /&gt;start() {&lt;BR /&gt; ...&lt;BR /&gt; touch /var/lock/subsys/servicename&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;stop() {&lt;BR /&gt; ...&lt;BR /&gt; rm -f /var/lock/subsys/servicename&lt;BR /&gt;}&lt;BR /&gt;Once you have created a script that conforms to these two requirements, place a copy of it into the /etc/init.d/ directory and execute the command: &lt;BR /&gt;&lt;BR /&gt;chkconfig --add servicename&lt;BR /&gt;This will register the service and create the necessary links in the appropriate rcX.d directories. You can now administer this service using chkconfig command.</description>
      <pubDate>Fri, 28 Mar 2008 10:59:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169542#M63773</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2008-03-28T10:59:46Z</dc:date>
    </item>
    <item>
      <title>Re: starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169543#M63774</link>
      <description>You can also add it to  more /etc/rc.local.</description>
      <pubDate>Fri, 28 Mar 2008 13:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169543#M63774</guid>
      <dc:creator>Ivan Ferreira</dc:creator>
      <dc:date>2008-03-28T13:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169544#M63775</link>
      <description>Thanks for the excellent reply.Both the posts proved useful to me</description>
      <pubDate>Tue, 01 Apr 2008 06:34:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169544#M63775</guid>
      <dc:creator>Karthik_sg</dc:creator>
      <dc:date>2008-04-01T06:34:24Z</dc:date>
    </item>
    <item>
      <title>Re: starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169545#M63776</link>
      <description>still no points!!!</description>
      <pubDate>Tue, 01 Apr 2008 10:23:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169545#M63776</guid>
      <dc:creator>skt_skt</dc:creator>
      <dc:date>2008-04-01T10:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: starting a script whenever the system reboots</title>
      <link>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169546#M63777</link>
      <description>I have assigned the points,Can u please point me to any useful linux links which talks more about the above query and more .Thanks for everything.</description>
      <pubDate>Wed, 02 Apr 2008 13:25:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/starting-a-script-whenever-the-system-reboots/m-p/4169546#M63777</guid>
      <dc:creator>Karthik_sg</dc:creator>
      <dc:date>2008-04-02T13:25:49Z</dc:date>
    </item>
  </channel>
</rss>

