Changed from manual to apt-get installation, service starts the old installation?

Hi,I changed from manual to apt-get installation. When starting the service, it looks to me as if the old installation is run. (Using Online-snapshot, I’m getting build #469, which is to one installed manually) The file defining the service hasn’t changed.
At what stage is the file that defines the service created in the apt-get process?
If I need to manually configure it, which entries need to be changed?
I guess it would be:

WorkingDirectory=/opt/openhab2

and

ExecStart=/opt/openhab2/start.sh server

What entries are needed?

If you did not remove your openhab.service file when you did the apt-get install, it may not have overwritten your old one with the new one because it was already there. Who knows what other stuff is hanging around.

I would uninstall the apt-get install using the -purge option, remove all traces of openhab from /etc/systemd/system, /etc/openhab2, and /usr/share/openhab2 (make backups of course) then try the apt-get install again.

With apt-get the parts of OH get spread across the file system in the typical Debian fashion:

  • configs go in /etc/openhab2
  • binaries go in /usr/share/openhab2
    etc.

Thanks for that.
Actually I made a trial using a modified openhab2.service file, which seems to run.
If I run into problems I’ll try your suggestion.

Digging a bit deeper into the system I found the reason for my “mishapp”.
For the manual installation the docs suggest to put the service-file into /lib/systemd/system. When doing an apt-get installation that file gets created under /usr/lib/systemd/system.
When starting the service the OS is obviously looking first into /lib/systemd/system, if the service-file is there, this one is used.
So, simply removing the file in /lib/systemd/system solved the problem completly!