Re: [systemd-devel] blocking service on shutdown

2018-09-10 Thread Lennart Poettering
On So, 02.09.18 15:37, Ralf Sieger ([email protected]) wrote: >Hi, > >I want my system to pause on shutdown to wait till my backup has finished >if it is running. >For this I've created this small service: > >[Unit] >Description=borg shutdown wait >[Service]

Re: [systemd-devel] blocking service on shutdown

2018-09-05 Thread Michael Biebl
Am Di., 4. Sep. 2018 um 18:53 Uhr schrieb Ralf Sieger : > > Well, it does wait when I press the power button on the case. > It does not wait if I enter as root poweroff or reboot. > I assume the first one goes through the logind while the second case does > straight to systemd... > You are correc

Re: [systemd-devel] blocking service on shutdown

2018-09-04 Thread Ralf Sieger
: "Michael Biebl" An: "Ralf Sieger" Cc: "systemd Mailing List" Betreff: Re: Re: [systemd-devel] blocking service on shutdown 2018-09-04 18:17 GMT+02:00 Ralf Sieger : > Hi Michael, > > this solution has a couple of drawbacks: > - block will let shutdo

Re: [systemd-devel] blocking service on shutdown

2018-09-04 Thread Michael Biebl
2018-09-04 18:17 GMT+02:00 Ralf Sieger : > Hi Michael, > > this solution has a couple of drawbacks: > - block will let shutdown, etc. fail, I do only need a pause/wait > - delay does not work with reboot It should work for shutdown, i.e. reboot. -- Why is it that all of the instruments seeking

Re: [systemd-devel] blocking service on shutdown

2018-09-04 Thread Ralf Sieger
" Cc: "systemd Mailing List" Betreff: Re: [systemd-devel] blocking service on shutdown 2018-09-02 15:37 GMT+02:00 Ralf Sieger : > Hi, > > I want my system to pause on shutdown to wait till my backup has finished if > it is running. I would suggest using an inhibito

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Reindl Harald
Am 03.09.18 um 00:04 schrieb Amit Saha: > > I had to achieve something similar a while back and this is how I ended > up doing:  > > https://echorand.me/doing-something-before-systemd-shuts-your-supervisord-down.html when "ExecStop=/bin/sleep 300" is the solution if want my problems back _

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Amit Saha
Hi Ralf, On Sun, 2 Sep 2018 at 11:40 pm, Ralf Sieger wrote: > Hi, > > I want my system to pause on shutdown to wait till my backup has finished > if it is running. > For this I've created this small service: > > [Unit] > Description=borg shutdown wait > [Service] > Type=oneshot > ExecStart=/bin/

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Reindl Harald
Am 02.09.18 um 16:41 schrieb Ralf Sieger: > Hi Harald, >   >> what exactly does "/usr/local/bin/wait_borg"? > Small script which terminates whn no "borg" processes exist any more. > >> why are the no dependecnies to the services it waits for? > The process it waits for is not a service but a nor

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Michael Biebl
2018-09-02 15:37 GMT+02:00 Ralf Sieger : > Hi, > > I want my system to pause on shutdown to wait till my backup has finished if > it is running. I would suggest using an inhibitor lock when running your backup. See https://www.freedesktop.org/wiki/Software/systemd/inhibit/ That's exactly the use-

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Ralf Sieger
ot; An: [email protected] Betreff: Re: [systemd-devel] blocking service on shutdown Am 02.09.18 um 15:37 schrieb Ralf Sieger: > I want my system to pause on shutdown to wait till my backup has > finished if it is running. > For this I've created this small service

Re: [systemd-devel] blocking service on shutdown

2018-09-02 Thread Reindl Harald
Am 02.09.18 um 15:37 schrieb Ralf Sieger: > I want my system to pause on shutdown to wait till my backup has > finished if it is running. > For this I've created this small service: >   > [Unit] > Description=borg shutdown wait > [Service] > Type=oneshot > ExecStart=/bin/true > RemainAfterExit=tr

[systemd-devel] blocking service on shutdown

2018-09-02 Thread Ralf Sieger
Hi,   I want my system to pause on shutdown to wait till my backup has finished if it is running. For this I've created this small service:   [Unit] Description=borg shutdown wait [Service] Type=oneshot ExecStart=/bin/true RemainAfterExit=true ExecStop=/usr/local/bin/wait_borg TimeoutStopSe