stash
stash copied to clipboard
Catch TERM signal to unlock repos
We should catch TERM signal so that we can gracefully shutdown any restic process. Otherwise, we will get those locked repo issue.
- https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html
- https://golang.org/pkg/os/exec/#CommandContext
We are running into this as well, if we deploy while a backup is running, the locks are never cleared