openenergymonitor / emonpi

Raspberry Pi Based Energy Monitor. Hardware, Firmware & related software for the PI.
https://guide.openenergymonitor.org/setup
270 stars 113 forks source link

Save wificheck.log to tmpfs-backed /var/log #124

Closed tiberiusteng closed 3 years ago

tiberiusteng commented 4 years ago

I have a emonpi which is used for forwarding all data from emonTX/emonTH to my server hosting Emoncms. It itself doesn't save any incoming data.

Few days earlier I login to it and discovered that /home/pi/data is still being written, and the only file with recent mtime is wificheck.log.

Given that wifi-check is only used for restarting wifi connection I think saving its log to /var/log would be OK, and this can prolong the life of SD card.

bwduncan commented 3 years ago

looks good to me

glynhudson commented 3 years ago

You must be running an older SD card image, on the newer images wificheck.log is written to var/log/emoncms/wificheck.log. : https://github.com/openenergymonitor/EmonScripts/blob/faf295b371d32868e1050dd2b202d8a9d397fcb3/install/emonsd.sh#L72

The EmonScripts repo contains the scripts used to build the newer SD card image.I'm afraid I can't merge this PR since it could break older images which still use the files in the emonPi repo.