How to: Run a command on start / boot up on Raspberry Pi Wheezy (Autostart)
I recently had the problem that my OpenVPN tunnel did not assigned to an IP address. Since i was not in a mood to find out what causes the problem i simply wrote a bash script that runs “dhclient tap0” after booting up the system.
for example, “sudo nano /home/pi/myautoip.sh” :
printf “Trying to get an IP address for tap0”
In order to achieve that this command is executed we have to add a command to /etc/rc.local.
so “sudo nano /etc/rc.local”. Add this ABOVE the “exit 0”: