title: Unix troubleshooting, missing /etc/init.d file
body: <p>I am working through this <a href="http://www.godlikemouse.com/2011/03/31/php-daemons-tutorial/" rel="nofollow">tutorial</a> on daemonizing php scripts. When I run the following Unix command:</p>
  
  <pre><code>. /etc/init.d/functions
  
  #startup values
  log=/var/log/Daemon.log
  
  #verify that the executable exists
  test -x /home/godlikemouse/Daemon.php || exit 0RETVAL=0
  
  prog="Daemon"
  proc=/var/lock/subsys/Daemon
  bin=/home/godlikemouse/Daemon.php
  
  start() {
      # Check if Daemon is already running
      if [ ! -f $proc ]; then
          echo -n $"Starting $prog: "
          daemon $bin --log=$log
          RETVAL=$?
          [ $RETVAL -eq 0 ] &amp;&amp; touch $proc
          echo
      fi
  
      return $RETVAL
  }
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>./Daemon: line 12: /etc/init.d/functions: No such file or directory
  Starting Daemon: daemon: unrecognized option `--log=/var/log/Daemon.log'
  </code></pre>
  
  <p>I looked at my file system and there was no /etc/init.d file. Can anyone tell me what this is and where to obtain it? Also is the absence of that file what's causing the other error?</p>