title: Custom linux startup file in /etc/init.d/ failing on startup
body: <p>I'm am newish to linux, and I am trying to write a simple bash script to load on startup. All it does is send my IP to my website, since I'm on a DHCP network and I want to get the local network of my IP to ssh it when I'm on the same network. Anyway, this code works just fine as just a bash script, but when I try to put it in startup I keep getting the following error in startup:</p>
  
  <pre><code>[FAIL] startpar: service(s) returned failure: UpdateIP ... failed!
  </code></pre>
  
  <p>I'm not sure how to fix this. All my code is the following (Named UpdateIP), and I'm on a Raspberry Pi:</p>
  
  <pre><code>#!/bin/sh
  
  IP_ADDR=$(ifconfig eth0 | sed -rn 's/^.*inet addr:(([0-9]+\.){3}[0-9]+).*$/\1/p')
  wget -q -O /dev/null http://example.com/private/RPi_IP.php?send=${IP_ADDR}
  </code></pre>
  
  <p>Like I said, it works great alone as a bash script. I'm not sure how to make it work on startup. Any ideas?</p>