Looks like I should have started a new topic - the cause of this seems unrelated to the original issue. Apologies.
Done some searching, and found the ‘local’ change below was related to a fix in Jun 2017, due to Emonpi requiring periodic restarting. See EmonPi needs periodic restarting - #9 by TrystanLea for details.
I think this is no longer needed, right?
pi@emonpi(ro):emonhub$ git diff src/emonhub.py
diff --git a/src/emonhub.py b/src/emonhub.py
index aee21c0…84c4271 100755
— a/src/emonhub.py
+++ b/src/emonhub.py
@@ -138,6 +138,7 @@ class EmonHub(object):
if not I.isAlive():
#I.start()
self._log.warning(I.name + " thread is dead") # had to be restarted")
self._exit = True
`# Sleep until next iteration
time.sleep(0.2)
In fact, the watchdog for this fix is still in my crontab.
* * * * * /home/pi/watchdog.sh >> /home/pi/data/watchdog.log 2>&1
Is it obsolete and safe to remove now? I asked that question in May 2019 but did not get replies:
Seeing that, I thought I can force an update for emonhub without losing anything important. I started with the two ls and the one cat commands:
pi@emonpi(rw):emonhub$ ls -la /usr/{local/bin,share}/emonhub
ls: cannot access /usr/share/emonhub: No such file or directory
lrwxrwxrwx 1 root staff 20 Jul 23 15:28 /usr/local/bin/emonhub -> /home/pi/emonhub/src
pi@emonpi(rw):emonhub$ ls -la /etc/{init.d/,}emonhub
lrwxrwxrwx 1 root root 32 Jan 26 2016 /etc/init.d/emonhub -> /home/pi/emonhub/service/emonhub
/etc/emonhub:
total 8
drwxr-xr-x 2 root root 4096 Jul 23 16:41 .
drwxr-xr-x 100 root root 4096 Jul 23 15:39 ..
lrwxrwxrwx 1 root root 26 Jul 23 16:41 emonhub.conf -> /home/pi/data/emonhub.conf
pi@emonpi(rw):emonhub$ systemctl cat emonhub.service
# /run/systemd/generator.late/emonhub.service
# Automatically generated by systemd-sysv-generator
[Unit]
SourcePath=/etc/init.d/emonhub
Description=LSB: Start/stop emonHub
Before=runlevel2.target runlevel3.target runlevel4.target runlevel5.target shutdown.target
After=remote-fs.target systemd-journald-dev-log.socket
Conflicts=shutdown.target
[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SysVStartPriority=3
ExecStart=/etc/init.d/emonhub start
ExecStop=/etc/init.d/emonhub stop
pi@emonpi(rw):emonhub$
Then I tried the forced update of emonhub: git checkout -f -b emon-pi, but it fails with:
pi@emonpi(rw):emonhub$ git checkout -f -b emon-pi
fatal: A branch named 'emon-pi' already exists.
Hmm, what should I do next? Many thanks for your help.