1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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