veracrypt.init 387 B

123456789101112131415161718
  1. #!/sbin/openrc-run
  2. # Copyright 1999-2016 Gentoo Foundation
  3. # Distributed under the terms of the GNU General Public License v2
  4. depend() {
  5. after localmount
  6. need device-mapper
  7. }
  8. stop() {
  9. # Try to remove any dm-crypt mappings
  10. if [ -x /usr/bin/veracrypt ]; then
  11. ebegin "Removing veracrypt mappings"
  12. ! /usr/bin/veracrypt -l > /dev/null 2>&1 || /usr/bin/veracrypt -d
  13. eend $?
  14. fi
  15. }