Start script on network connect
- by Nate Mara
I am trying to get a GNU/Linux Bash script to run as soon as a network connection is established on my Raspberry Pi. I tried following the instructions on several pages:
I have tried adding my script to /etc/network/if-up.d and running sudo chmod ugo+x on the file.
I have tried adding the line post-up <path/to/script.sh> to /etc/network/interfaces
I am really quite clueless here.
More info:
The script runs fine when manually run, here it is: http://pastebin.com/UJvt5HYU (I did remove my personal info (email addresses, passwords), but other than that, the script is unchanged. This script also uses the sendEmail program (can be found at http://caspian.dotconf.net/menu/Software/SendEmail/).