mirror of
https://github.com/home-assistant/operating-system.git
synced 2026-04-29 05:04:27 +01:00
Allow configuration of the swap size via /etc/default/haos-swapfile file. By setting the SWAPSIZE variable in this file, swapfile get recreated on the next reboot to the defined size. Size can be either in bytes or with optional units (B/K/M/G, accepting some variations but always interpreted as power of 10). The size is then rounded to 4k block size. If no override is defined or the value can't be parsed, it falls back to previously used 33% of system RAM. Fixes #968
14 lines
288 B
Desktop File
14 lines
288 B
Desktop File
[Unit]
|
|
Description=HAOS swap
|
|
DefaultDependencies=no
|
|
Requires=etc-default.mount mnt-data.mount
|
|
After=etc-default.mount mnt-data.mount systemd-growfs@mnt-data.service
|
|
Before=mnt-data-swapfile.swap
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
ExecStart=/usr/libexec/haos-swapfile
|
|
|
|
[Install]
|
|
WantedBy=swap.target
|