Skip to content

Commit 5969a52

Browse files
committed
fixup! fix: run systemctl daemon-reload before Containerd restart
Only systemctl daemon-reload when needed.
1 parent 4b4a0ab commit 5969a52

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/handlers/generic/mutation/containerdapplypatchesandrestart/templates/containerd-restart.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
2-
systemctl daemon-reload
2+
if [ "$(systemctl show containerd -p NeedDaemonReload --value)" == "yes" ]; then
3+
systemctl daemon-reload
4+
fi
35
systemctl restart containerd
46

57
if ! command -v crictl; then

0 commit comments

Comments
 (0)