On 01/16/2013 11:09 AM, Lennart Poettering wrote:
On Mon, 14.01.13 02:22, Zbigniew Jędrzejewski-Szmek ([email protected]) wrote:

But I don't want to _stop_ the service. I want the running service
to not restart when/if it dies.
There's a dbus property
   readonly s Restart
exposed for units. It would serve your usecase perfectly to make it
writable. Alas.

This wouldn't really work, as the next "systemctl daemon-reload" would
drop the field again...

A solution for now could be to
'sed s/Restart=yes/Restart=no/ ipsec.service > 
/run/systemd/systemd/ipsec.service'
and 'systemctl daemon-reload'. The changes will go away at next
reboot. (This will only work if you install files into
/usr/lib/systemd/system and not /etc/systemd/system, since the latter
once take precedence.)

Yeah, this is kinda the same solution I proposed here:

https://bugzilla.redhat.com/show_bug.cgi?id=807897

But /run gets cleared on reboots. So I would still lose the setting.

I opted for always changing the /lib/systemd/system/ipsec.service file and running daemon-reload.

Paul

_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to