Skip to content

Instantly share code, notes, and snippets.

@rickardrosen
Created December 7, 2019 13:59
Show Gist options
  • Save rickardrosen/da3643fbf5d04d6121549c60e9527a53 to your computer and use it in GitHub Desktop.
Save rickardrosen/da3643fbf5d04d6121549c60e9527a53 to your computer and use it in GitHub Desktop.
Load ZFS encryption keys: /etc/systemd/system/zfs-load-key.service
[Unit]
Description=Load encryption keys
DefaultDependencies=no
Before=zfs-mount.service
After=zfs-import.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash -c '/usr/bin/zfs load-key -a'
[Install]
WantedBy=zfs-mount.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment