octocatalog: add dummy file for LE service certs
[mirror/dsa-puppet.git] / modules / rsync / files / systemd-cleanup-failed-rsyncs
1 #!/bin/bash
2
3 # if a client goes away on socket activated connections before systemd launches
4 # the process, things go sad and result in failed services.
5 #
6 # cf. https://github.com/systemd/systemd/issues/7172
7 #
8 # should be fixed in buster and newer, but for now clean those up.
9
10 systemctl --failed --no-legend | awk '{print $1}' | \
11     while read service; do
12     if [[ $service =~ ^rsyncd-[a-z]*@.*\.service$ ]]; then
13         systemctl reset-failed "$service"
14     fi
15 done