Dataplicity VPN

Just a quick note on using this with emonSD, the service will fail to start after a reboot as the log files cannot be found.

This is due to the logs being held in RAM and lost on reboot on a read-only OS.

So aside from the obvious use of “rpi-rw” before using the install command provided by dataplicity, you must also add something like

if [ ! -d /var/log/supervisor ]; then
        mkdir /var/log/supervisor;
        touch /var/log/supervisor/supervisord.log
        chown -R dataplicity:dataplicity /var/log/supervisor;
        service supervisor restart
fi

to the /etc/rc.local file to ensure a logfile is recreated at each new boot, and then the service restarted again.

I have deliberately created a standalone entry in rc.local for dataplicity rather than adding it to the existing list of “officially included” softwares that need the logfiles created at boot because it is not “officially included” and therefore any automated updating of the existing code using regex could be disabled or result in this edit being over-written. Unfortunately if the rc.local file is over-written entirely during an update this edit will need to be re-applied.

1 Like