From 0d2c08f8e8b31b10e81cf2e5503a5f1d69caf593 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Wed, 13 Mar 2019 18:31:52 +0100 Subject: [PATCH] Get rid of cloud cleaning script It makes more sense to incorporate this script into the deployment script. --- cloud/aws.sh | 6 ++++++ cloud/clean.sh | 9 --------- 2 files changed, 6 insertions(+), 9 deletions(-) delete mode 100755 cloud/clean.sh diff --git a/cloud/aws.sh b/cloud/aws.sh index a8f9f40..84af469 100755 --- a/cloud/aws.sh +++ b/cloud/aws.sh @@ -71,3 +71,9 @@ Restart=on-failure [Install] WantedBy=multi-user.target" | sudo tee /etc/systemd/system/tutor-webui.service sudo systemctl enable tutor-webui + +echo "=============== Clean authorized keys" +sudo find / -name "authorized_keys" -exec rm -f {} \; + +echo "=============== Clean history" +sudo find /root/.*history /home/*/.*history -exec rm -f {} \; diff --git a/cloud/clean.sh b/cloud/clean.sh deleted file mode 100755 index 58b2e29..0000000 --- a/cloud/clean.sh +++ /dev/null @@ -1,9 +0,0 @@ -#! /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 | bash -e -echo "=============== Clean authorized keys" -sudo find / -name "authorized_keys" -exec rm -f {} \; - -echo "=============== Clean history" -sudo find /root/.*history /home/*/.*history -exec rm -f {} \;