Improve encfs cookbook
Fix some things, and prepare for path-based activation. Also, comment the buggy initial dir creation and explain manual provisioning in README for now.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
systemd-ask-password --echo "encfs password:" | encfs <%= @encrypted_directory %> <%= @mount_directory %> --public --stdinpass
|
||||
echo "Encrypted data directory mounted as <%= @mount_directory %>" > /tmp/data-dir-mounted.txt
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Start <%= @service_unit %> when encrypted data directory is mounted
|
||||
|
||||
[Path]
|
||||
PathExists=/tmp/data-dir-mounted.txt
|
||||
Unit=<%= @service_unit %>
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
4
site-cookbooks/kosmos_encfs/templates/unmount_encfs.erb
Normal file
4
site-cookbooks/kosmos_encfs/templates/unmount_encfs.erb
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
rm /tmp/data-dir-mounted.txt
|
||||
/bin/umount <%= @mount_directory %>
|
||||
Reference in New Issue
Block a user