Debian cloud-init userdata

When you spin up a cloud VM at Google Compute or Digital Ocean there’s an option to specify user data, this is my goto script to update Debian and setup a  2G swapfile.

#!/usr/bin/env bash
dd if=/dev/zero of=/swap bs=1M count=2048
chmod 600 /swap
mkswap /swap
swapon /swap
echo "/swap swap swap defaults 0 0" >> /etc/fstab
apt update
apt -y upgrade
shutdown -r now

Fights over guns here and in DC + A Republican candidate’s tax prescription + Elaine Howle’s …

East Bay Times: It was bad enough that Federal Communications Commission Chairman Ajit Pai, a former Verizon lawyer, engineered the repeal of President Obama’s landmark rules prohibiting Internet Service Providers from blocking or slowing down the internet or giving preference for certain online …

This post was generated automatically from a Google Alert. Original source...