<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Hi,</div>
<div> </div>
<div>I want my system to pause on shutdown to wait till my backup has finished if it is running.</div>
<div>For this I've created this small service:</div>
<div> </div>
<div>
<div>[Unit]<br/>
Description=borg shutdown wait</div>
<div>[Service]<br/>
Type=oneshot<br/>
ExecStart=/bin/true<br/>
RemainAfterExit=true</div>
<div>ExecStop=/usr/local/bin/wait_borg<br/>
TimeoutStopSec=600</div>
<div>[Install]<br/>
WantedBy=multi-user.target</div>
<div> </div>
<div>I'm using ubuntu 18.04, systemd 237</div>
<div> </div>
<div>Manually stopping the service via</div>
<div>systemctl stop borg_wrapper</div>
<div>does wait and thus works.</div>
<div> </div>
<div>But its not working on normal shutdown/poweroff ...</div>
<div>From the logs I can't even see an entry with</div>
<div>"Stopping borg shutdown wait" in syslog.</div>
<div> </div>
<div>Does anyone has an idea?</div>
<div> </div>
</div>
<div class="signature">Regards,<br/>
<br/>
Ralf</div></div></body></html>