Advertisement
schoolpiclub

rc.local including email IP on start up

Apr 20th, 2014
552
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. sleep 30
  2. # rc.local
  3. #
  4. # This script is executed at the end of each multiuser runlevel.
  5. # Make sure that the script will "exit 0" on success or any other
  6. # value on error.
  7. #
  8. # In order to enable or disable this script just change the execution
  9. # bits.
  10. #
  11. # By default this script does nothing.
  12. # Print the IP address if it doesn't work ad sleep 30 before all your code
  13. _IP=$(hostname -I) || true
  14. if [ "$_IP" ]; then
  15. printf "My IP address is %s\n" "$_IP"
  16. python /home/pi/Code/startup_mailer.py
  17. fi
  18. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement