I wanted to switch from old sysvinit to systemd, I’m starting to like systemd more and more, and I had some issues with Domoticz segfault’ing on me. (I’m always running latest git, so I can hardly blame them.)
What I had to do follows:
Remove the old sysvinit-scripts:
:~# update-rc.d domoticz remove
Move the old init-script away, just in case.
:~# mv /etc/init.d/domoticz ./domoticzinit
Create the new systemd.service, adjust as needed.
:~# editor /lib/systemd/system/domoticz.service
Description=Domoticz Home Automation
ExecStart=/home/domo/domoticz/domoticz -daemon -www 8080 -sslwww 443
Enable the new service
:~# systemctl enable domoticz.service
Reboot to verify, or do what makes you confident that this works as intended.
:~# systemctl status domoticz.service
Rejoice, and delete the old init-script.
:~# rm ./domoticzinit