summaryrefslogtreecommitdiff
path: root/veracrypt/debian/scripts/30veracrypt
diff options
context:
space:
mode:
Diffstat (limited to 'veracrypt/debian/scripts/30veracrypt')
-rwxr-xr-xveracrypt/debian/scripts/30veracrypt19
1 files changed, 19 insertions, 0 deletions
diff --git a/veracrypt/debian/scripts/30veracrypt b/veracrypt/debian/scripts/30veracrypt
new file mode 100755
index 0000000..33085e4
--- /dev/null
+++ b/veracrypt/debian/scripts/30veracrypt
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+test -d /run/systemd/system && exit 0
+
+VERACRYPT_SUSPEND_UNMOUNT=yes
+
+. /etc/default/veracrypt
+
+case "${VERACRYPT_SUSPEND_UNMOUNT}" in
+[Nn]*)
+ exit 0
+ ;;
+esac
+
+case "$1" in
+ suspend|hibernate)
+ /usr/bin/veracrypt --dismount
+ ;;
+esac
bgstack15