Update swap.sh
This commit is contained in:
parent
c1a914f304
commit
210a977cff
5
swap.sh
5
swap.sh
@ -1,6 +1,9 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
dd if=/dev/zero of=/swapfile bs=1m count=1024
|
SIZE="1024"
|
||||||
|
if [ -n "$1" ]; then SIZE="$1"; fi
|
||||||
|
|
||||||
|
dd if=/dev/zero of=/swapfile bs=1m count="$SIZE"
|
||||||
chown 600 /swapfile
|
chown 600 /swapfile
|
||||||
mkswap /swapfile
|
mkswap /swapfile
|
||||||
swapon /swapfile
|
swapon /swapfile
|
||||||
|
Loading…
Reference in New Issue
Block a user