Hello I am trying to run domoticz on boot as a docker container, so I have the following "domoticz.service" file in /storage/.config/system.d
Code
[Unit]
Description=Domoticz Container
Requires=service.system.docker.service
After=service.system.docker.service
[Service]
Restart=no
RestartSec=10s
TimeoutStartSec=0
ExecStart=/storage/.kodi/addons/service.system.docker/bin/docker start domoticz
ExecStop=/storage/.kodi/addons/service.system.docker/bin/docker stop domoticz
[Install]
WantedBy=multi-user.target
Display More
After a reboot the domoticz container starts (I can see it running from "docker ps" command), but after some seconds it suddenly stops. If I enable the parameter "Restart" to "Allways" the docker container keeps starting and stopping in a loop.
If I check the container logs with the command "docker logs domoticz", I get the following:
Code
[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing...
usermod: no changes
-------------------------------------
_ ()
| | ___ _ __
| | / __| | | / \
| | \__ \ | | | () |
|_| |___/ |_| \__/
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid: 0
User gid: 0
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 30-config: executing...
[cont-init.d] 30-config: exited 0.
[cont-init.d] 99-custom-scripts: executing...
[custom-init] no custom scripts found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
2019-05-20 12:29:53.084 Status: Domoticz V4.10740 (c)2012-2019 GizMoCuz
2019-05-20 12:29:53.084 Status: Build Hash: 34b73c19, Date: 2019-05-12 18:47:31
2019-05-20 12:29:53.085 Status: Startup Path: /var/lib/domoticz/
2019-05-20 12:29:53.648 Sunrise: 06:54:00 SunSet: 21:29:00
2019-05-20 12:29:53.648 Day length: 14:35:00 Sun at south: 14:11:00
2019-05-20 12:29:53.648 Civil twilight start: 06:22:00 Civil twilight end: 21:60:00
2019-05-20 12:29:53.648 Nautical twilight start: 05:43:00 Nautical twilight end: 22:39:00
2019-05-20 12:29:53.648 Astronomical twilight start: 04:59:00 Astronomical twilight end: 23:23:00
Display More
If I run the ExecStart command manually it works perfectly. What is wrong?
Thanks!