[Unit] Description=LUKS2 encrypted data partition setup Documentation=man:cryptsetup(8) DefaultDependencies=no Conflicts=umount.target After=systemd-udevd.service Before=local-fs.target umount.target # Wait for the block device to appear After=dev-mmcblk0p3.device Wants=dev-mmcblk0p3.device [Service] Type=oneshot RemainAfterExit=yes ExecStart=/usr/sbin/beacon-encrypt-data.sh [Install] WantedBy=local-fs.target