Advertisement
Guest User

Untitled

a guest
Oct 10th, 2019
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.19 KB | None | 0 0
  1. #!/bin/bash
  2. s=$(cat /etc/fstab | grep -c 'UUID')
  3. if [ $s -eq 2 ]; then
  4.     swapoff -a;
  5.     rm -f /swapfile;
  6.     fallocate -l 4G /swapfile;
  7.     chmod 600 /swapfile;
  8.     mkswap /swapfile;
  9.     swapon -a;
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement