Use crontab rather than systemd for starting the camera up on boot
lolpro11 opened this issue · comments
Why use a systemd module rather than using a crontab entry like this:
@reboot bash -c "export DISPLAY=:0; libcamera-hello -t 0 --autofocus-mode continuous"
I think that having a crontab script is easier than creating a systemd module.
Edit: seems like you want to load up the desktop before starting the camera.
Please refer to this link: https://forums.raspberrypi.com/viewtopic.php?t=294014
systemd is already used to manage processes. It has pretty good built in logging which is easier than trying to grep through logs to find out what is going on for a given cron command. It allows for a service (what) to be defined and to run with a given timer (when). All of this is declarative and easily maintained in code. I think the pros of systemd outweigh the cons.