## Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC <adrelanos@whonix.org>
## See the file COPYING for copying conditions.

[Unit]
Description=Creates a swap file on LUKS-encrypted systems
Documentation=https://www.kicksecure.com/wiki/swap-file-creator
After=haveged.service
After=jitterentropy.service
After=systemd-random-seed-load.service

## Do nothing inside systemd-nspawn container since does not work and swap is
## managed by host.
ConditionVirtualization=!systemd-nspawn

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/share/swap-file-creator/swap-file-creator start
ExecStop=/usr/share/swap-file-creator/swap-file-creator stop
## Added console for better look and feel.
StandardOutput=journal+console

[Install]
WantedBy=multi-user.target
