-
-
Save ecentinela/563f6ba89125f363443fa163a090be08 to your computer and use it in GitHub Desktop.
Data Destroying Drone script
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
#!/bin/bash | |
set -e | |
export INSTANCE_ID=`wget -q -O - http://169.254.169.254/latest/meta-data/instance-id` | |
export VOLUME_ID=v-12345678 | |
export EC2_URL=https://ec2.us-east-1.amazonaws.com | |
export EC2_ACCESS_KEY=[key id] | |
export EC2_SECRET_KEY=[key] | |
sudo apt-get install scrub | |
euca-attach-volume -i $INSTANCE_ID -d /dev/sdj $VOLUME_ID | |
sudo scrub -b 50M -p dod /dev/sdj > ~/sdj.scrub.log 2>&1 | |
sleep 30 | |
euca-detach-volume $VOLUME_ID | |
euca-delete-volume $VOLUME_ID | |
halt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment