diff options
author | B Stack <bgstack15@gmail.com> | 2019-02-02 13:20:04 +0000 |
---|---|---|
committer | B Stack <bgstack15@gmail.com> | 2019-02-02 13:20:04 +0000 |
commit | 6fd541d7510f66d91a38a83b1a3ff01ae6fbfe3f (patch) | |
tree | 85e7694e00578f4353b3f7da419d4749437e0532 /veracrypt/debian/veracrypt.init | |
parent | Merge branch 'freefilesync-dpkg' into 'master' (diff) | |
parent | add veracrypt dpkg first draft (diff) | |
download | stackrpms-6fd541d7510f66d91a38a83b1a3ff01ae6fbfe3f.tar.gz stackrpms-6fd541d7510f66d91a38a83b1a3ff01ae6fbfe3f.tar.bz2 stackrpms-6fd541d7510f66d91a38a83b1a3ff01ae6fbfe3f.zip |
Merge branch 'veracrypt-dpkg' into 'master'
veracrypt dpkg for devuan
See merge request bgstack15/stackrpms!34
Diffstat (limited to 'veracrypt/debian/veracrypt.init')
-rw-r--r-- | veracrypt/debian/veracrypt.init | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/veracrypt/debian/veracrypt.init b/veracrypt/debian/veracrypt.init new file mode 100644 index 0000000..398838a --- /dev/null +++ b/veracrypt/debian/veracrypt.init @@ -0,0 +1,56 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: veracrypt +# Required-Start: +# Required-Stop: $remote_fs +# Should-Start: +# Should-Stop: +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: Remove remaining VeraCrypt device mappings. +# Description: This init script will dismount mounted VeraCrypt partitions before shutdown. +### END INIT INFO + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +VERACRYPT_SHUTDOWN_UNMOUNT="yes" + +. /lib/lsb/init-functions + +[ -x /usr/bin/veracrypt ] || exit 0 + +if [ -r /etc/default/veracrypt ]; then + . /etc/default/veracrypt +fi + +case "${VERACRYPT_SHUTDOWN_UNMOUNT}" in +[Nn]*) + exit 0 + ;; +esac + +do_stop() +{ + log_action_begin_msg "Removing VeraCrypt device mappings" + veracrypt -d + log_action_end_msg $? +} + +case "$1" in + start) + # No-op + ;; + status) + veracrypt --list + ;; + restart|reload|force-reload) + # No-op + ;; + stop) + do_stop + ;; + *) + echo "Usage: $0 stop|status" >&2 + exit 3 + ;; +esac + |