To avoid issues I am seeing with the sources needing to be refreshed and avoid any other similar issues related to losing the Wi-Fi connection, I have decided to restart my Pi every day.
However a manual sources refresh is requried, but I have put together a script I can call using curl via cron (which incidentally needs to be enabled and started, see here for how to do this
#37
Script - refresh_sources.sh
#!/bin/sh
printf "$(date) - Refreshing sources...\n"
curl --silent -d "Content-Length=10&Content-Type=application/x-www-form-urlencoded&mountall=1&Referer=http://192.168.0.15/sources/" http://192.168.0.15/sources/ > /dev/null
printf "$(date) - Finished refreshing sources\n"
You'll obviously need to change the location of your device in the above script.
cron
And you can setup the cron job using crontab -e command and add the following
30 2 * * * shutdown -r
45 2 * * * /scripts/refresh_sources.sh >> /tmp/refresh_sources.log
I appreciate this will likely be redundant when 0.4 comes out but I thought I should share my findings. It was a good little exercise for me to play around with inspecting headers using Tamper Data
https://addons.mozilla.org/en-us/firefox/addon/tamper-data/