Thinking more about this, I think I will go with your recommendations @pb66 re emonhub installation procedure:
- Using /usr/share/emonhub for the emonhub.py symlink
- Using /etc/emonhub/emonhub.conf
- We’ve already agreed on emonhub.log
- Creating the logfile and folder using the service file rather than in the install scripts
I’ve got this all working on my test SD card build and Im happy with it./
In order to use the same emonhub.service on the current image and new build process I need to place emonhub.conf in /etc/emonhub on the current image. The original reason for using /home/pi/data was due to the read only partition. That said it could have easily been symlinked to /etc/emonhub/emonhub.conf.
In order to provide backwards compatibility for older images with a read only partition, I think a good solution is to 1. update emonhub.service to our desired configuration as above for the new build, 2. symlink the existing /home/pi/data/emonhub.conf to /etc/emonhub/emonhub.conf on current and older images. Would you be happy with this?