Emonpi full update

Did a full update and noticed that in the log I get the following …

On branch stable Your branch is behind 'origin/stable' by 148 commits, and can be fast-forwarded. (use "git pull" to update your local branch)

Changes not staged for commit:
(use “git add …” to update what will be committed)
(use “git checkout – …” to discard changes in working directory)

modified:   service/emonhub.service

Untracked files:
(use “git add …” to include in what will be committed)

src/src

no changes added to commit (use “git add” and/or “git commit -a”)

Looking at the file, I don’t see anything obvious that I might have changed nor remember doing so.

How do I resolve it?

You must have modified that file emonhub.service.

Git will not update until you sort that out.

You also need to include more log to see which repository the problem is. I’ll expect it is the emonhub repository.

You can ignore this error.

Yes, it is emonhub.

Do I su to emonhub user and then cd to the relevant place and perform ‘git checkout –’ - I don’t recall changing the file.

cd /opt/openenergymonitor/emonhub/
git diff
git status

and post the output from those commands please.

pi@emonpi:/opt/openenergymonitor/emonhub $ git diff
diff --git a/service/emonhub.service b/service/emonhub.service
index 216f391..4df17be 100644
--- a/service/emonhub.service
+++ b/service/emonhub.service
@@ -8,7 +8,7 @@ After=sysinit.target syslog.target local-fs.target

 [Service]
 User=emonhub
-PIDFile=/var/run/emonhub.pid
+PIDFile=/run/emonhub.pid
 ExecStart=/usr/local/bin/emonhub/emonhub.py --config-file=/etc/emonhub/emonhub.conf --logfile=/var/log/emonhub/emonhub.log
 PermissionsStartOnly=true
 ExecStartPre=/bin/mkdir -p /var/log/emonhub/
pi@emonpi:/opt/openenergymonitor/emonhub $ git status
On branch stable
Your branch is behind 'origin/stable' by 148 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   service/emonhub.service

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        src/src

no changes added to commit (use "git add" and/or "git commit -a")

I don’t know why the service file would have changed and those items added. If you cannot recollect doing so I suggest setting it back to the default and running an update from the UI.

to revert the changes

git checkout -- service/emonhub.service

then run an update from the UI (don’t just git pull).

Thanks, all sorted now.

1 Like