Skip to content
Snippets Groups Projects
Commit 05e1207e authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Adds swap service.

parent 51dcdcda
No related branches found
No related tags found
No related merge requests found
[Unit]
Description=Turn on swap
[Service]
Type=oneshot
RemainAfterExit=true
ExecStartPre=-/bin/bash -euxc ' \
fallocate -l 8192m /swap &&\
chmod 600 /swap &&\
mkswap /swap'
ExecStart=/sbin/swapon /swap
ExecStop=/sbin/swapoff /swap
[Install]
WantedBy=local.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment