billw2 / pikrellcam

Raspberry Pi motion vector detection program with OSD web interface.
GNU General Public License v3.0
261 stars 70 forks source link

Error on autostart if /etc/rc.local is missing #68

Open Cyber1000 opened 3 years ago

Cyber1000 commented 3 years ago

Problem: /etc/rc.local is missing, install gives me this error (and pikrellcam doesn't start automatically)

grep: /etc/rc.local: No such file or directory
grep: /etc/rc.local: No such file or directory
Adding a pikrellcam autostart command to /etc/rc.local:
sed: can't read /etc/rc.local: No such file or directory
Added execute permission to /etc/rc.local
chmod: cannot access '/etc/rc.local': No such file or directory
grep: /etc/rc.local: No such file or directory

Creating an empty /etc/rc.local removes the errors, but file stays empty.

Proposal: create a systemd-file instead, since systemd is used by a lot of distros nowadays (or at least fix /etc/rc.local if it is missing, don't know for now if we just could create this file)

If I have never started pikrell before and navigating the web-interface I'm just getting "No preview jpeg" which jumps around (at least on chrome), I nearly can't click anything.

btw I also had to do a sudo usermod -aG video dietpi (the user is called dietpi and is missing from group video) to get video running

Thanks!

Cyber1000 commented 3 years ago

Having looked around:

Cyber1000 commented 3 years ago

Following works:

[Service] User = dietpi Group = dietpi Type = simple ExecStart = pikrellcam Restart = always RestartSec = 15

[Install] WantedBy = multi-user.target


- systemctl enable pikrellcam
- reboot computer

I  don't know if using of /etc/rc.local has any special meaning here (for example old OSes), so I didn't make a PR so far.
Let me know if I can help adjusting the install file ...