3 # if a client goes away on socket activated connections before systemd launches
4 # the process, things go sad and result in failed services.
6 # cf. https://github.com/systemd/systemd/issues/7172
8 # should be fixed in buster and newer, but for now clean those up.
10 systemctl --failed --no-legend | awk '{print $1}' | \
11 while read service; do
12 if [[ $service =~ ^rsyncd-[a-z0-9-]*@.*\.service$ ]] ||
13 [[ $service =~ ^session-[0-9]+\.scope$ ]]; then
14 systemctl reset-failed "$service"