Created
December 10, 2015 21:15
-
-
Save fvosberg/02a090f405a3b4ed4d93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in $(docker-machine ls | grep digitalocean | awk '{print $1}'); \ | |
do printf "\x1B[01;33m\n$i\n\x1B[0m" && docker-machine ssh $i ls /swapfile || \ | |
docker-machine ssh $i -- \ | |
"fallocate -l 1G /swapfile && chmod 600 /swapfile && mkswap /swapfile && \ | |
echo -e '\n/swapfile none swap defaults 0 0' >> /etc/fstab && swapon -a && free -htl"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment