On Thu, 02.04.15 18:43, Dimitrios Apostolou (ji...@gmx.net) wrote: > Hello list, > > I'm having trouble to auto-activate a unit on resume, after suspend-to-ram > or hibernation. The unit properly stops when suspending (because of > Conflicts=sleep.target), but does not restart after resuming.
We do not really support that right now. Suspend/hibernate is implemented as a single transaction, and you cannot stop a unit and start it in the same transaction. A hackish way to implement this is by using the suspend callout dir /usr/lib/systemd/system-sleep/ (see systemd-suspend.service(8) for details), and enqueue a stop and a start job from there, depending on whether the hook is called before or after the suspend/hibernation. But yeah, this is hackish. Usually if one wants to do that one is just working around some problems that are better solved in a different way. Why precisely do you need this feature? Lennart -- Lennart Poettering, Red Hat _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel