On Apr 8, 2022, at 08:43, olivares33561 via users <users(a)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