When creating docker try without --restart unless-stopped.
I have created the docker container removing that parameter but nothing changes.
It seems that domoticz is started but then somehow it exits/gets killed.
If I run the command "systemct start domoticz.service" and just after that I run "systemctl status domoticz" I get the following:
● domoticz.service - Domoticz Container
Loaded: loaded (/storage/.config/system.d/domoticz.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2019-05-22 10:24:01 CEST; 1s ago
Process: 1998 ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop domoticz (code=exited, status=0/SUCCESS)
Main PID: 2274 (docker)
Memory: 5.2M
CGroup: /system.slice/domoticz.service
└─2274 /storage/.kodi/addons/service.system.docker/bin/docker start domoticz
May 22 10:24:01 kodi systemd[1]: Started Domoticz Container.
Just after that one I run the same command and I get:
● domoticz.service - Domoticz Container
Loaded: loaded (/storage/.config/system.d/domoticz.service; enabled; vendor preset: disabled)
Active: deactivating (stop) since Wed 2019-05-22 10:25:07 CEST; 755ms ago
Process: 2716 ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker start domoticz (code=exited, status=0/SUCCESS)
Main PID: 2716 (code=exited, status=0/SUCCESS); Control PID: 2889 (docker)
Memory: 4.9M
CGroup: /system.slice/domoticz.service
└─2889 /storage/.kodi/addons/service.system.docker/bin/docker stop domoticz
May 22 10:25:06 kodi systemd[1]: Started Domoticz Container.
May 22 10:25:07 kodi docker[2716]: domoticz
Display More
And if I run the same command again:
● domoticz.service - Domoticz Container
Loaded: loaded (/storage/.config/system.d/domoticz.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Wed 2019-05-22 10:25:09 CEST; 2s ago
Process: 2889 ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop domoticz (code=exited, status=0/SUCCESS)
Process: 2716 ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker start domoticz (code=exited, status=0/SUCCESS)
Main PID: 2716 (code=exited, status=0/SUCCESS)
May 22 10:25:06 kodi systemd[1]: Started Domoticz Container.
May 22 10:25:07 kodi docker[2716]: domoticz
May 22 10:25:09 kodi docker[2889]: domoticz
And domoticz container is not running ("docker ps -a"):
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c7cf291ef6b6 linuxserver/domoticz "/init" 15 minutes ago Exited (0) 5 minutes ago domoticz
What can I do?
Thanks!