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