Przeglądaj źródła

Reset systemd start counter before restarting a service

Prevents systemd to reject a restart command on batch inserts, scripting, backup restore etc

(cherry picked from commit 602766b425b8ac28aff17b0b1107e691a0c661e9)
Robert Zollner 6 lat temu
rodzic
commit
2d82ccaee0
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      bin/v-restart-service

+ 1 - 0
bin/v-restart-service

@@ -50,6 +50,7 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
         "$service" = "fail2ban" ]; then
     systemctl reload-or-restart $service > /dev/null 2>&1
 else
+    systemctl reset-failed $service > /dev/null 2>&1
     systemctl restart $service > /dev/null 2>&1
 fi