Created
June 5, 2018 03:37
-
-
Save ar1a/e4317eaae910e57be0837cb96f320995 to your computer and use it in GitHub Desktop.
docker btrfs pause on suspend with arch-luks-suspend - /usr/lib/systemd/system-sleep/docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -eu | |
if [ $# -ne 2 ]; then | |
exit 1 | |
fi | |
if [ _"$2" != _"suspend" ]; then | |
exit 1 | |
fi | |
case "$1" in | |
pre) docker pause $(docker ps -aq) ;; | |
post) docker unpause $(docker ps -aq) ;; | |
*) exit 1 ;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment