mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-12-12 14:17:46 +00:00
Add cloud-cleaning script
This commit is contained in:
parent
b266178784
commit
3e59b530f8
9
cloud/clean.sh
Executable file
9
cloud/clean.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#! /bin/bash
|
||||
# Clean an AWS instance so that it becomes ready for creating an AMI
|
||||
# See https://aws.amazon.com/articles/how-to-share-and-use-public-amis-in-a-secure-manner/
|
||||
# Run with: curl -sSL https://raw.githubusercontent.com/regisb/tutor/master/cloud/clean.sh | sudo bash -e
|
||||
echo "=============== Clean authorized keys"
|
||||
find / -name "authorized_keys" -exec rm -f {} \;
|
||||
|
||||
echo "=============== Clean history"
|
||||
find /root/.*history /home/*/.*history -exec rm -f {} \;
|
Loading…
Reference in New Issue
Block a user