Jeff Solomon
2017-11-08 01:33:50 UTC
Hi,
I would like to use a user service (systemctl --user) with systemd on RHEL7
where it has been deliberately removed.
I've communicated with the RH dev who made this change who reported that I
could restore the /lib/systemd/system/***@.service file and mostly
everything would work.
I don't care about having the user service exist only when the user is
logged in, as I will enable lingering on the service and I want it to be
running from boot to shutdown.
I've found that I can run:
systemctl start ***@foo
to start the foo user's service and that works, but on other systems
(Ubuntu) where user services are officially supported, the user service is
automatically started when I run:
loginctl enable-linger foo
whereas on RHEL, running this command does not start the service.
I can imagine writing a tiny additional service on RHEL that will start the
user service using:
ExecStart=/usr/bin/systemctl start ***@foo
but I'd rather make lingering officially work on RHEL to the extent that
that is possible.
Two questions:
1) Any idea how to make lingering work such that the user service is
started automatically on reboot
2) Is it a really dumb idea to try to make this work on RHEL7?
Thanks!
Jeff
I would like to use a user service (systemctl --user) with systemd on RHEL7
where it has been deliberately removed.
I've communicated with the RH dev who made this change who reported that I
could restore the /lib/systemd/system/***@.service file and mostly
everything would work.
I don't care about having the user service exist only when the user is
logged in, as I will enable lingering on the service and I want it to be
running from boot to shutdown.
I've found that I can run:
systemctl start ***@foo
to start the foo user's service and that works, but on other systems
(Ubuntu) where user services are officially supported, the user service is
automatically started when I run:
loginctl enable-linger foo
whereas on RHEL, running this command does not start the service.
I can imagine writing a tiny additional service on RHEL that will start the
user service using:
ExecStart=/usr/bin/systemctl start ***@foo
but I'd rather make lingering officially work on RHEL to the extent that
that is possible.
Two questions:
1) Any idea how to make lingering work such that the user service is
started automatically on reboot
2) Is it a really dumb idea to try to make this work on RHEL7?
Thanks!
Jeff