Update 'CoreModules/generic/preconf.sh'
This commit is contained in:
@@ -1,3 +1,29 @@
|
||||
##------------##
|
||||
# System #
|
||||
##------------##
|
||||
|
||||
hostnamectl set-hostname $hostname
|
||||
sed -i 's/;preserve_hostname: false/preserve_hostname: true/g' /etc/cloud/cloud.cfg
|
||||
timedatectl set-timezone Europe/Amsterdam
|
||||
|
||||
|
||||
##----------##
|
||||
# Swap #
|
||||
##----------##
|
||||
|
||||
if free | awk '/^Swap:/ {exit !$2}'; then
|
||||
echo "swap enabled"
|
||||
else
|
||||
fallocate -l 1G /swapfile
|
||||
chmod 600 /swapfile
|
||||
mkswap /swapfile
|
||||
swapon /swapfile
|
||||
echo '/swapfile swap swap defaults 0 0' >> /etc/fstab
|
||||
fi
|
||||
sed -i 's/#/vm.swappiness=10/g' /etc/sysctl.conf
|
||||
sed -i 's/#/vm.vfs_cache_pressure=50/g' /etc/sysctl.conf
|
||||
|
||||
|
||||
##-------------##
|
||||
# Postfix #
|
||||
##-------------##
|
||||
|
||||
Reference in New Issue
Block a user