diff options
| author | kj-sh604 | 2025-03-28 14:28:40 -0400 |
|---|---|---|
| committer | kj-sh604 | 2025-03-28 14:28:40 -0400 |
| commit | 3d6371b8621e813734e5ae9b0ce19c04b8cf8af6 (patch) | |
| tree | 27f70e88c64865c79153a99c7527099ac428470c | |
| parent | ae5c15f3b1554f891772067089c66497cec8f6d5 (diff) | |
feat: `dump-swap-and-retoggle`
| -rwxr-xr-x | .local/bin/dump-swap-and-retoggle | 8 |
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" |
