Delay Channels DVR Starting up?

Would anyone be able to point me in the right direction for a solution; my Channels DVR server starts up before my tvheadend server (which is in the same container). Is there a way to delay the channels service on systemd?

Thanks in advance, Alex

So this is some sort of custom container you built?

How about having each in their standard container, but in the same stack, and then use:

    depends_on:
      - tvheadend

in the CDVR portion of the stack's compose. That way the CDVR portion won't spin-up until tvheadend is running.

Using Portainer and Docker Compose would be the easy way to do this, if you don't already have them.

Thanks for the reply. It’s a proxmox container using the channels script, I just added tvheadend via docker to the container. Channel is running natively in the container.

I rebooted the system recently and found channels not picking up the tvheadend m3u and it looks like it’s too quick for it.

In that case, I'd recommend moving docker (with tvheadend) to its own LXC container, and use Proxmox to set the startup order and any needed delays. That would give more granular control for shutdowns and reboots as well.

I'd recommend installing Portainer and OliveTin-for-Channels :slight_smile: in that setup too, which makes it super quick-and-easy to spin-up whatever Channels-related project you want to use. A little bit like the tteck scripts for Proxmox, but these are for CDVR projects via Portainer/Docker.

I appreciate the recommendation but would rather keep things are they are.

I have stacks setup with portainer and it’s excellent.

You should be able to add a delay in the start of the Channels DVR service using systemctl, in a form something like this:

[Service]
ExecStartPre=/bin/sleep 30

List services:

systemctl list-units --type=service --all

Edit service:

systemctl edit --full your-service.service
1 Like

Will give that a go. Thank you!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.