aboutsummaryrefslogtreecommitdiff
path: root/.local/bin/dump-swap-and-retoggle
blob: f314c0293bc8d83dac56d4513ce3c9d78b583c5f (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

echo "dumping swap back into memory...";
sudo swapoff -a || { echo "failed to turn off swap"; exit 1; }
echo "swap has been cleared and dumped back into memory"

sudo swapon -a || { echo "failed to re-enable swap"; exit 1; }
echo "fresh swap storage has been re-enabled"