On Apr 8, 2022, at 08:43, olivares33561 via users 
<users@lists.fedoraproject.org> wrote:
> 
> [olivares@fedora user]$ systemctl --user enable poweroff.service

If you are editing files in /etc/systemd/system, then take off the “--user” and 
use sudo when activating the service. Never use sudo in a systemd Exec line 
unless you have a really specific need for it. 

It will need to be run as the system because only root can activate the 
poweroff non-interactively. 

I’m also not really thrilled with the idea of a systemd service calling 
systemctl. It seems to me it would make more sense to have the timer directly 
reference Unit=poweroff.target and forgo the service unit entirely. 

--
Jonathan Billings
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to