aboutsummaryrefslogtreecommitdiff
path: root/.local
diff options
context:
space:
mode:
Diffstat (limited to '.local')
-rwxr-xr-x.local/bin/dump-swap-and-retoggle8
1 files changed, 8 insertions, 0 deletions
diff --git a/.local/bin/dump-swap-and-retoggle b/.local/bin/dump-swap-and-retoggle
new file mode 100755
index 0000000..f314c02
--- /dev/null
+++ b/.local/bin/dump-swap-and-retoggle
@@ -0,0 +1,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"