Skip to content

Instantly share code, notes, and snippets.

View cristim's full-sized avatar
🖖
Always learning

Cristian Magherusan-Stanciu cristim

🖖
Always learning
View GitHub Profile
#!/bin/bash
. /etc/bashrc
# EC2 Metadata
export REGION=$(curl -s http://169.254.169.254/latest/dynamic/instance-identity/document/ | jq .region -r)
export INSTANCEID=$(curl -s http://169.254.169.254/latest/meta-data/instance-id)
# Get all tags in one call
ec2-describe-tags --filter "resource-type=instance" --filter "resource-id=$(ec2-metadata -i | cut -d ' ' -f2)" | cut -f 4,5 > /tmp/ec2_tags
@cristim
cristim / S99deploycode
Created January 31, 2018 16:48 — forked from Jinkxed/S99deploycode
check-codedeploy.sh
#!/bin/bash
#
# check-codedeploy check-codedeploy shipper
#
# chkconfig: 2345 98 02
# description: Starts and stops a single check-codedeploy instance on this system
#
### BEGIN INIT INFO
# Provides: check-codedeploy