Kleine Pimmel Scripts


wget -q https://kps.makz.net/run/mkfswap.sh -O - | bash

#!/bin/bash
_SIZE='2' # Gigabyte
if [ -f "/swapfile" ]
then
	echo 'Swap file /swapfile already exists.'
	swapon --show
else
	fallocate -l ${_SIZE}G /swapfile
	chmod 600 /swapfile
	mkswap /swapfile
	swapon /swapfile
	swapon --show
	echo "Add to your /etc/fstab: /swapfile swap swap defaults 0 0"
fi