DVR Service Unable to Start After Reboot

I am running Channels DVR on a Raspberry Pi 4 with the latest version of Raspberry Pi OS. I am noticing that while I can get the service to start up and run fine after installation, when I reboot the system the channels-dvr service fails to start. I did the following:

sudo systemctl status channels-dvr.service

And got the following output:

● channels-dvr.service - Channels DVR
     Loaded: loaded (/etc/systemd/system/channels-dvr.service; enabled; preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Wed 2024-08-07 12:12:20 PDT; 8s ago
    Process: 1246 ExecStart=/bin/sh -c exec /media/bossadmin/Elements2/channels-dvr/latest/channels-dvr >> /media/bossadmin/Elements2/channels-dvr/data/channels-dvr.log 2>&1 (code=exited, status=127)
   Main PID: 1246 (code=exited, status=127)
        CPU: 5ms

I then did journalctl -u channels-dvr.service and got the following output:

Aug 07 12:15:35 lori-rpi systemd[1]: channels-dvr.service: Failed with result 'exit-code'.
Aug 07 12:15:35 lori-rpi systemd[1]: channels-dvr.service: Main process exited, code=exited, status=127/n/a
Aug 07 12:15:35 lori-rpi systemd[1]: Started channels-dvr.service - Channels DVR.
Aug 07 12:15:35 lori-rpi systemd[1]: Stopped channels-dvr.service - Channels DVR.
Aug 07 12:15:35 lori-rpi systemd[1]: channels-dvr.service: Scheduled restart job, restart counter is at 36.

Since I have Channels installed on an external hard drive, I went to the channels-dvr directory and noticed that the latest symlink may be having issues (ls -l usually evaluates as expected, but sometimes does not). So I have subsequently updated the following line in the service file:

ExecStart=/bin/sh -c 'exec /media/bossadmin/Elements2/channels-dvr/2024.07.18.0352/channels-dvr >> /media/bossadmin/Elements2/channels-dvr/data/channels-dvr.log 2>&1'

Once this change was made Channels now starts as expected when the system reboots. However, if I switch back to using "latest" it stops working immediately after reboot. Obviously this is not ideal and I can imagine will probably break once an update is released. Any suggestions of how best to approach/resolve this would be greatly appreciated!

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