Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Commit

Permalink
copy up pristinify script to ~ec2-user
Browse files Browse the repository at this point in the history
  • Loading branch information
jrgm committed Jun 11, 2014
1 parent 0c1d07c commit 1a30723
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .cdist/manifest/init
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ __file /etc/cdist-configured
__setup_user app --mode=0711
__setup_user proxy

# a script that will do a cleanup before creating the AMI
__file /home/ec2-user/pristinify.sh --source users/ec2-user/pristinify.sh \
--state present --owner=ec2-user --group=ec2-user --mode=0755

# setup nginx
require="__update_packages __setup_user/proxy" \
__setup_nginx
Expand Down
3 changes: 2 additions & 1 deletion users/ec2-user/pristinify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ sudo -u proxy rm /home/proxy/{cert,key}.pem
sudo -u proxy -i /home/proxy/gen_self_signed.sh

# cut ourself off at the knees
truncate -s 0 ~/.ssh/authorized_keys
# This is now part of `./awsbox.js createami ...`
#truncate -s 0 ~/.ssh/authorized_keys

# clean out proxy logs
sudo find /home/proxy/var/log -type f | sudo xargs --no-run-if-empty /bin/rm -fv
Expand Down

0 comments on commit 1a30723

Please sign in to comment.