Move failed rsync cleanup into systemd module
[mirror/dsa-puppet.git] / modules / rsync / files / systemd-cleanup-failed-rsyncs
diff --git a/modules/rsync/files/systemd-cleanup-failed-rsyncs b/modules/rsync/files/systemd-cleanup-failed-rsyncs
deleted file mode 100755 (executable)
index 5cde92b..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/bin/bash
-
-# if a client goes away on socket activated connections before systemd launches
-# the process, things go sad and result in failed services.
-#
-# cf. https://github.com/systemd/systemd/issues/7172
-#
-# should be fixed in buster and newer, but for now clean those up.
-
-systemctl --failed --no-legend | awk '{print $1}' | \
-    while read service; do
-    if [[ $service =~ ^rsyncd-[a-z]*@.*\.service$ ]]; then
-        systemctl reset-failed "$service"
-    fi
-done