[systemd-devel] Unit that depends on A or B

2016-06-02 Thread Mathijs Kwik
Hi all, On my system, I can setup 2 VPN connections, which are mutually exclusive as they reach the same subnet for the most part. Let's call these A and B. A is faster than B, but B gives access to some extra subnets. Now, I have a unit(some-dht.service) that needs a VPN connection but does

Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-07 Thread Mathijs Kwik
孙冰 writes: > I use this: > > [Unit] > Description=Wicd sleep hook > Before=sleep.target > StopWhenUnneeded=yes > > [Service] > Type=oneshot > RemainAfterExit=yes > ExecStart=-/usr/share/wicd/daemon/suspend.py > ExecStop=-/usr/share/wicd/daemon/autoconnect.

Re: [systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-07 Thread Mathijs Kwik
such a state (which RemainAfterExit provides). But maybe I need to alter my view on services a bit. For now I will try your solution. Thanks On Wed, Aug 7, 2013 at 1:02 PM, Tom Gundersen wrote: > On Wed, Aug 7, 2013 at 10:12 AM, Mathijs Kwik > wrote: >> I have a few things that ne

[systemd-devel] Fwd: best way to handle service restarts after hibernate/suspend?

2013-08-07 Thread Mathijs Kwik
Hi all, I have a few things that need to get run after waking up my laptop (things like hdparm to set device power options/spindown time). I created oneshot, remainafterexit services for those and made them wanted by multi-user.target.This works fine for the first boot. As I consider these servic