title: Linux daemon start up
body: <p><em>i wrote one service on linux(Redhat Server Edition 5.1) . which is started by shell scritpt, 
  In case when i start my application i manually start my service , now i want to start my service at boot time,by means i put my service on init.d folder by my daemon not invoke at boot time,any have idea how to  start a daemon at boot time on linux?</em> </p>
  
  <p>this my sample but is not working</p>
  
  <pre><code>#!/bin/sh
  #
  # myservice     This shell script takes care of starting and stopping
  #               the &lt;myservice&gt;
  #
  
  # Source function library
  . /etc/rc.d/init.d/functions
  
  
  # Do preliminary checks here, if any
  #### START of preliminary checks #########
  
  
  ##### END of preliminary checks #######
  
  
  # Handle manual control parameters like start, stop, status, restart, etc.
  
  case "$1" in
    start)
      # Start daemons.
  
      echo -n $"Starting &lt;myservice&gt; daemon: "
      echo
      daemon &lt;myservice&gt;
      echo
      ;;
  
    stop)
      # Stop daemons.
      echo -n $"Shutting down &lt;myservice&gt;: "
      killproc &lt;myservice&gt;
      echo
  
      # Do clean-up works here like removing pid files from /var/run, etc.
      ;;
    status)
      status &lt;myservice&gt;
  
      ;;
    restart)
      $0 stop
      $0 start
      ;;
  
    *)
      echo $"Usage: $0 {start|stop|status|restart}"
      exit 1
  esac
  
  exit 0
  </code></pre>