Sha256: 1bf3d264f0798a7545f1a19a75aeb99579a717b4ab423b85d342622ced09dbff

Contents?: true

Size: 580 Bytes

Versions: 9

Compression:

Stored size: 580 Bytes

Contents

curl http://169.254.169.254/2009-04-04/meta-data/public-keys/0/openssh-key 2>/dev/null >/tmp/my-key

if [ $? -eq 0 ] ; then
   for home in `find /home/* -maxdepth 0 -type d 2>/dev/null | tr '\n' ' '`; do
       user=`echo $home | awk -F '/' '{ print $3 }'`

       if [ ! -d $home/.ssh ] ; then
            mkdir -p $home/.ssh
            chmod 700 $home/.ssh
            chown $user $home/.ssh
        fi

       cat /tmp/my-key >> $home/.ssh/authorized_keys
       chmod 600 $home/.ssh/authorized_keys
       chown $user $home/.ssh/authorized_keys

   done
   rm /tmp/my-key
fi

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
brightbox-boxgrinder-plugins-0.0.6 lib/platform/src/rc_local
brightbox-boxgrinder-plugins-0.0.5 lib/platform/src/rc_local
brightbox-boxgrinder-plugins-0.0.4 lib/platform/src/rc_local
brightbox-boxgrinder-plugins-0.0.3 lib/platform/src/rc_local
boxgrinder-build-0.9.2 lib/boxgrinder-build/plugins/platform/ec2/src/rc_local
brightbox-boxgrinder-plugins-0.0.2 lib/platform/src/rc_local
brightbox-boxgrinder-plugins-0.0.1 lib/platform/src/rc_local
boxgrinder-build-0.9.1 lib/boxgrinder-build/plugins/platform/ec2/src/rc_local
boxgrinder-build-0.9.0 lib/boxgrinder-build/plugins/platform/ec2/src/rc_local