Is there any way to delay the start of the Motion service on RPI restart? I'm having an issue where v4l does not make it yet to provide /dev/video0 but Motion is already trying to open it and obviously fails to the grey screen. The log shows:
[1:ml1] [NTC] [VID] [Jan 15 23:59:11] vid_v4lx_start: Using videodevice /dev/video0 and input -1
[1:ml1] [ALR] [VID] [Jan 15 23:59:11] vid_v4lx_start: Failed to open video device /dev/video0: No such file or directory
while the /dev/video0 appears in the system some milliseconds afterwards, however too late to let the Motion catch it.
Is there any way to slow or actually delay the motion server startup on boot/restart?
The OS is Raspbian Stretch on RPI 3B+:
Linux rpi-vrel-4 4.14.70-v7+ #1144 SMP Tue Sep 18 17:34:46 BST 2018 armv7l GNU/Linux
Regards,
Piotr
After=some.service
andBindsTo=some.service
. If you runsystemctl edit motion.service [or whatever your service is called]
it will generate a new .conf file and leave the original one. For more details take a look here: askubuntu.com/a/659268.