In case this is useful to anyone...

As the web server data is written to the SD every 5 minutes, I felt it 
would be appropriate to create a RAM disc for it. Should, in theory, 
improve lifespan of the SD card.

Anyhow, I just created an entry in */etc/fstab* for the folder which is 
just the weather data, in my case it's the root of the web server 
*/var/www/html* but in your case (and default) may be 
*/var/www/html/weather*.

The entry is...

*tmpfs /var/www/html tmpfs nodev,nosuid,size=20M 0 0*

I gave it 20MB of RAM even though the web server is currently using ~700KB, 
but I have 1GB of RAM total to play with and will allow for potential 
expansion. Plus, it's the only thing I have on this particular Pi (Orange 
Pi PC running Armbian).

Just means, that on boot it can take up to 5 minutes for the web server to 
be populated with files and will likely return a 403 error when you try to 
look at it from a browser.

I also created a temporary splash page that just says "loading, please 
wait." which is loaded by a cron entry on @reboot.

*cp /home/pi/temp-splash.html /var/www/html/index.html*

Hope this is useful to someone. Has been quite fun to instigate.

-James Muirhead.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/ac488fc8-9624-43d8-bb84-58d626ffdd83%40googlegroups.com.

Reply via email to