Update bin/create-swap.sh

This commit is contained in:
2024-07-26 23:22:43 -04:00
parent 8ff7b8af1b
commit 185cf35598

9
bin/create-swap.sh Normal file
View 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