Skip to content

Commit 602766b

Browse files
committed
Reset systemd start counter before restarting a service
Prevents systemd to reject a restart command on batch inserts, scripting, backup restore etc
1 parent 7164d6f commit 602766b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bin/v-restart-service

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ elif [ -z "$force" -o "$force" = "no" ] && [ \
5050
"$service" = "fail2ban" ]; then
5151
systemctl reload-or-restart $service > /dev/null 2>&1
5252
else
53+
systemctl reset-failed $service > /dev/null 2>&1
5354
systemctl restart $service > /dev/null 2>&1
5455
fi
5556

0 commit comments

Comments
 (0)