diff options
-rwxr-xr-x | share/provision/development | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/share/provision/development b/share/provision/development index bca3847..011c548 100755 --- a/share/provision/development +++ b/share/provision/development @@ -43,3 +43,18 @@ fi apps/inception init apps/metadot/metadot load-bundle development apps/metadot/metadot deps-bundle development + +# Hibernation support +# https://wiki.archlinux.org/index.php/Swap#Swap_file +# https://wiki.archlinux.org/index.php/Uswsusp +if ! grep -q "/swapfile" /etc/fstab; then + echo "Configuring hibernation..." + sudo fallocate -l 2G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + echo "/swapfile none swap defaults 0 0" | sudo tee -a /etc/fstab > /dev/null + $APT_INSTALL uswsusp + echo "RESUME=/swapfile" | sudo tee /etc/initramfs-tools/conf.d/resume > /dev/null + sudo update-initramfs -v -u +fi |