Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Cyber1000 opened this issue Jan 9, 2021 · 2 comments
Open

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

Cyber1000 opened this issue Jan 9, 2021 · 2 comments

Comments

@Cyber1000
Copy link

  • RPi zero (old version 1.3 with wlan-dongle)
  • distro: dietpi (reduced raspbian-image)

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
Copy link
Author

Having looked around:

  • /etc/rc.local is long time obsolete (though some distros have used it as fallback for many years)
  • simple creating /etc/rc.local doesn't work here
  • I'll have a look in systemd and I'll post result here

@Cyber1000
Copy link
Author

Following works:

  • /etc/systemd/system/pikrellcam.service
[Unit]
Description = PiKrellCam

[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 ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant