Open menahishayan opened 2 years ago
I followed your guide but I was not successful (I'm not a linux expert).
when I ran the command systemctl enable rpiplay
It asked to authenticate me in big red letters which I found a bit odd:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-unit-files ===
Authentication is required to manage system service or unit files.
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
==== AUTHENTICATING FOR org.freedesktop.systemd1.reload-daemon ===
Authentication is required to reload the systemd state.
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
after this I tried starting the service like you wrote with systemctl start rpiplay
It then again asked to verify me in big red letters:
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Authentication is required to start 'rpiplay.service'.
Authenticating as: ,,, (pi)
Password:
==== AUTHENTICATION COMPLETE ===
Failed to start rpiplay.service: Unit rpiplay.service has a bad unit file setting.
As you can see it failed.
I am running a raspberry pi zero with raspbian buster light.
I'm going to need to see the exact rpiplay.service
file that you created to understand what went wrong
@B0rax You need to run sudo systemctl enable rpiplay
instead. Only users with root privileges are allowed to make changes to the systemd system, since without that security it would allow all kinds of software to automatically start at boot.
Yes @B0rax using sudo
would get rid the Authentication message in "big red letters" as you call it. However, Failed to start rpiplay.service: Unit rpiplay.service has a bad unit file setting.
is interesting. Give sudo
a try and see if it solves the problem. If not, lets look at the rpiplay.service
file and see what went wrong. but using services is the right approach and should be the way we go about it.
Added instructions in the README to properly autostart the server on boot using a systemd service.