Skip to content

Instantly share code, notes, and snippets.

View cmfcruz's full-sized avatar
:octocat:
Mostly at work

Carlo Miguel Cruz cmfcruz

:octocat:
Mostly at work
View GitHub Profile
@cmfcruz
cmfcruz / prepare-for-ami.sh
Last active November 23, 2019 11:57 — forked from garlandkr/ami-clean.sh
Clean-up an Amazon Linux EC2 instance before creating an AMI
#!/bin/bash
# Run this script using the ec2-user with:
# sudo bash <(curl -s https://gist.github.com/cmfcruz/75b29d12740f8916006c10e48ea33bc1/raw/ami-clean.sh)
function print_green {
echo -e "\e[32m${1}\e[0m"
}
function print_red {