Commit 03fa4d00 authored by squbs's avatar squbs

disabled swap inc

parent 5afecd9a
......@@ -6,17 +6,17 @@ set -ex
STAK_IMAGE=${STAK_IMAGE:-squbs/straks-node:1.14.5-armhf}
memtotal=$(grep ^MemTotal /proc/meminfo | awk '{print int($2/1024) }')
#memtotal=$(grep ^MemTotal /proc/meminfo | awk '{print int($2/1024) }')
# Only do swap hack if needed
if [ $memtotal -lt 2048 -a $(swapon -s | wc -l) -lt 2 ]; then
sudo fallocate -l 2048M /swap || sudo dd if=/dev/zero of=/swap bs=1M count=2048
sudo mkswap /swap
grep -q "^/swap" /etc/fstab || sudo echo "/swap swap swap defaults 0 0" >> /etc/fstab
sudo swapon -a
fi
free -m
#if [ $memtotal -lt 2048 -a $(swapon -s | wc -l) -lt 2 ]; then
# sudo fallocate -l 2048M /swap || sudo dd if=/dev/zero of=/swap bs=1M count=2048
# sudo mkswap /swap
# grep -q "^/swap" /etc/fstab || sudo echo "/swap swap swap defaults 0 0" >> /etc/fstab
# sudo swapon -a
#fi
#free -m
curl -fsSL get.docker.com -o /tmp/get-docker.sh
......
......@@ -6,17 +6,17 @@ set -ex
STAK_IMAGE=${STAK_IMAGE:-squbs/straks-node}
memtotal=$(grep ^MemTotal /proc/meminfo | awk '{print int($2/1024) }')
#memtotal=$(grep ^MemTotal /proc/meminfo | awk '{print int($2/1024) }')
# Only do swap hack if needed
if [ $memtotal -lt 2048 -a $(swapon -s | wc -l) -lt 2 ]; then
sudo fallocate -l 2048M /swap || sudo dd if=/dev/zero of=/swap bs=1M count=2048
sudo mkswap /swap
grep -q "^/swap" /etc/fstab || sudo echo "/swap swap swap defaults 0 0" >> /etc/fstab
sudo swapon -a
fi
free -m
#if [ $memtotal -lt 2048 -a $(swapon -s | wc -l) -lt 2 ]; then
# sudo fallocate -l 2048M /swap || sudo dd if=/dev/zero of=/swap bs=1M count=2048
# sudo mkswap /swap
# grep -q "^/swap" /etc/fstab || sudo echo "/swap swap swap defaults 0 0" >> /etc/fstab
# sudo swapon -a
#fi
#free -m
curl -fsSL get.docker.com -o /tmp/get-docker.sh
sh /tmp/get-docker.sh
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment