@Dan in CA wrote:
That’s interesting. Whenever I try that it never works.
What is your setup like? Wifi, hardwared?
I am using wifi. I did not know there were defaults if you did not specify anything. That makes sense since it is in the config that way. This is what my rc.local looks like and I have no issues, I have apache running on 80 for samer’s website and the interval program on 8080 so I can access both websites as needed.
#wait to make sure everything is ready to go (probably not needed)
#run a script that periodically makes sure wifi is running
/bin/sh /network-monitor.sh &
# change to the /OSPi directory
# run the interval program
/usr/bin/python ospi.py 0.0.0.0:8080 &
Here is what the network monitor script looks like, This helps because sometimes my router may reboot and I want the pi to reconnect if there is any issue. It checks every 5 minutes for a connection. I found it somewhere on the web I forget who wrote it sorry for not giving credit.
while true ; do
if /sbin/ifconfig wlan0 | grep -q “inet addr:” ; then
echo “Network connection down! Attempting reconnection.”
/sbin/ifup –force wlan0