[Unit]
Description=Mounting swapfile
DefaultDependencies=false

Before=swap.target shutdown.target
Conflicts=shutdown.target
Wants=swap.target

ConditionPathExists=/proc/swaps
ConditionKernelCommandLine=!noswap
ConditionKernelCommandLine=!installer

[Service]
Environment=HOME=/storage
Type=oneshot
ExecStartPre=/usr/lib/openelec/mount-swap create
ExecStart=/usr/lib/openelec/mount-swap mount
RemainAfterExit=yes

[Install]
WantedBy=basic.target
